Skip to content

Commit

Permalink
feat: Updated sdks/python/julep/managers/doc.py (#266)
Browse files Browse the repository at this point in the history
Co-authored-by: sweep-ai[bot] <128439645+sweep-ai[bot]@users.noreply.github.com>
  • Loading branch information
sweep-ai[bot] authored Apr 18, 2024
1 parent b07eadc commit 46e5b7c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdks/python/julep/managers/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DocsCreateArgs(TypedDict):

class BaseDocsManager(BaseManager):
"""
Manages documents for agents or users by providing methods to get, create, and delete docsrmation.
Manages documents for agents or users by providing internal methods to list, create, and delete documents.
The class utilizes an API client to interact with a back-end service that handles the document management operations.
Expand Down Expand Up @@ -79,6 +79,7 @@ def _list(
user_id (Optional[Union[str, UUID]]): The UUID v4 of the user for whom docs is requested, exclusive with `agent_id`.
limit (Optional[int]): The maximum number of records to return. Defaults to None.
offset (Optional[int]): The number of records to skip before starting to collect the response set. Defaults to None.
metadata_filter (Dict[str, Any]): A dictionary used for filtering documents based on metadata criteria. Defaults to an empty dictionary.
Returns:
Union[GetAgentDocsResponse, Awaitable[GetAgentDocsResponse]]: The response object containing docsrmation about the agent or user, or a promise of such an object if the call is asynchronous.
Expand Down Expand Up @@ -127,6 +128,7 @@ def _create(
agent_id (Optional[Union[str, UUID]]): The UUID of the agent or None.
user_id (Optional[Union[str, UUID]]): The UUID of the user or None.
doc (DocDict): A dictionary containing the document data for the resource being created.
metadata (Dict[str, Any]): Optional metadata for the document. Defaults to an empty dictionary.
Returns:
Union[ResourceCreatedResponse, Awaitable[ResourceCreatedResponse]]: The response after creating the resource, which could be immediate or an awaitable for asynchronous execution.
Expand Down Expand Up @@ -178,7 +180,7 @@ def _delete(
The result of the API deletion request. This can be the response object from the client's delete operation.
Raises:
AssertionError: If neither `agent_id` nor `user_id` is valid, if both are provided simultaneously, or if negation logic for valid UUIDs fails.
AssertionError: If both `agent_id` and `user_id` are provided, neither are provided, or if the provided IDs are not valid UUID v4 strings.
Other exceptions related to the `api_client` operations could potentially be raised and depend on its implementation.
"""
assert (
Expand Down

0 comments on commit 46e5b7c

Please sign in to comment.