diff --git a/.github/workflows/generate-docs.yml b/.github/workflows/generate-docs.yml index a53e79e09..a4b5ecce9 100644 --- a/.github/workflows/generate-docs.yml +++ b/.github/workflows/generate-docs.yml @@ -42,6 +42,55 @@ jobs: commit_message: "doc(sdks/ts): Generate docs for sdks/ts (CI)" branch: ${{ github.head_ref }} + Generate-Docs-For-Python-SDK: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install and configure Poetry + uses: snok/install-poetry@v1 + + - name: Configure Poetry to use .venv + run: | + cd sdks/python + poetry config virtualenvs.in-project true + + - name: Cache Poetry virtualenv + uses: actions/cache@v4 + with: + path: sdks/python/.venv + key: ${{ runner.os }}-sdks-python-poetry-${{ hashFiles('sdks/python/poetry.lock') }} + restore-keys: | + ${{ runner.os }}-sdks-python-poetry- + + - name: Cache pytype + uses: actions/cache@v4 + with: + path: sdks/python/.pytype + key: ${{ runner.os }}-sdks-python-pytype-${{ hashFiles('sdks/python/**/*.py') }} + restore-keys: | + ${{ runner.os }}-sdks-python-pytype- + + - name: Install dependencies + run: | + cd sdks/python + poetry install + + - name: Generate docs + run: | + cd sdks/python + poetry run poe generate-docs + + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "doc(sdks/python): Generate docs for sdks/python (CI)" + branch: ${{ github.head_ref }} + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/docs/python-sdk-docs/README.md b/docs/python-sdk-docs/README.md index 614bf8d64..d9a5345a7 100644 --- a/docs/python-sdk-docs/README.md +++ b/docs/python-sdk-docs/README.md @@ -18,7 +18,7 @@ A full list of `Julep Python SDK` project modules. - [Agent](julep/api/types/agent.md#agent) - [AgentDefaultSettings](julep/api/types/agent_default_settings.md#agentdefaultsettings) - [AgentDefaultSettingsPreset](julep/api/types/agent_default_settings_preset.md#agentdefaultsettingspreset) - - [Belief](julep/api/types/belief.md#belief) + - [AgentMetadata](julep/api/types/agent_metadata.md#agentmetadata) - [ChatInputData](julep/api/types/chat_input_data.md#chatinputdata) - [Chat Input Data Tool Choice](julep/api/types/chat_input_data_tool_choice.md#chat-input-data-tool-choice) - [ChatMlMessage](julep/api/types/chat_ml_message.md#chatmlmessage) @@ -32,43 +32,65 @@ A full list of `Julep Python SDK` project modules. - [ChatSettingsResponseFormatType](julep/api/types/chat_settings_response_format_type.md#chatsettingsresponseformattype) - [Chat Settings Stop](julep/api/types/chat_settings_stop.md#chat-settings-stop) - [CompletionUsage](julep/api/types/completion_usage.md#completionusage) + - [CreateAgentRequestMetadata](julep/api/types/create_agent_request_metadata.md#createagentrequestmetadata) - [CreateDoc](julep/api/types/create_doc.md#createdoc) + - [CreateDocMetadata](julep/api/types/create_doc_metadata.md#createdocmetadata) + - [CreateSessionRequestMetadata](julep/api/types/create_session_request_metadata.md#createsessionrequestmetadata) - [CreateToolRequest](julep/api/types/create_tool_request.md#createtoolrequest) - [CreateToolRequestType](julep/api/types/create_tool_request_type.md#createtoolrequesttype) + - [CreateUserRequestMetadata](julep/api/types/create_user_request_metadata.md#createuserrequestmetadata) - [Doc](julep/api/types/doc.md#doc) - - [Entity](julep/api/types/entity.md#entity) - - [Episode](julep/api/types/episode.md#episode) + - [DocMetadata](julep/api/types/doc_metadata.md#docmetadata) - [FunctionCallOption](julep/api/types/function_call_option.md#functioncalloption) - [FunctionDef](julep/api/types/function_def.md#functiondef) - [Function Parameters](julep/api/types/function_parameters.md#function-parameters) + - [GetAgentDocsRequestOrder](julep/api/types/get_agent_docs_request_order.md#getagentdocsrequestorder) + - [GetAgentDocsRequestSortBy](julep/api/types/get_agent_docs_request_sort_by.md#getagentdocsrequestsortby) - [GetAgentDocsResponse](julep/api/types/get_agent_docs_response.md#getagentdocsresponse) - [GetAgentMemoriesResponse](julep/api/types/get_agent_memories_response.md#getagentmemoriesresponse) - [GetAgentToolsResponse](julep/api/types/get_agent_tools_response.md#getagenttoolsresponse) - [GetHistoryResponse](julep/api/types/get_history_response.md#gethistoryresponse) - [GetSuggestionsResponse](julep/api/types/get_suggestions_response.md#getsuggestionsresponse) + - [GetUserDocsRequestOrder](julep/api/types/get_user_docs_request_order.md#getuserdocsrequestorder) + - [GetUserDocsRequestSortBy](julep/api/types/get_user_docs_request_sort_by.md#getuserdocsrequestsortby) - [GetUserDocsResponse](julep/api/types/get_user_docs_response.md#getuserdocsresponse) - [InputChatMlMessage](julep/api/types/input_chat_ml_message.md#inputchatmlmessage) - [InputChatMlMessageRole](julep/api/types/input_chat_ml_message_role.md#inputchatmlmessagerole) - - [Instruction](julep/api/types/instruction.md#instruction) - [JobStatus](julep/api/types/job_status.md#jobstatus) - [JobStatusState](julep/api/types/job_status_state.md#jobstatusstate) + - [ListAgentsRequestOrder](julep/api/types/list_agents_request_order.md#listagentsrequestorder) + - [ListAgentsRequestSortBy](julep/api/types/list_agents_request_sort_by.md#listagentsrequestsortby) - [ListAgentsResponse](julep/api/types/list_agents_response.md#listagentsresponse) + - [ListSessionsRequestOrder](julep/api/types/list_sessions_request_order.md#listsessionsrequestorder) + - [ListSessionsRequestSortBy](julep/api/types/list_sessions_request_sort_by.md#listsessionsrequestsortby) - [ListSessionsResponse](julep/api/types/list_sessions_response.md#listsessionsresponse) + - [ListUsersRequestOrder](julep/api/types/list_users_request_order.md#listusersrequestorder) + - [ListUsersRequestSortBy](julep/api/types/list_users_request_sort_by.md#listusersrequestsortby) - [ListUsersResponse](julep/api/types/list_users_response.md#listusersresponse) - [Memory](julep/api/types/memory.md#memory) - [MemoryAccessOptions](julep/api/types/memory_access_options.md#memoryaccessoptions) + - [MemoryEntitiesItem](julep/api/types/memory_entities_item.md#memoryentitiesitem) - [NamedToolChoice](julep/api/types/named_tool_choice.md#namedtoolchoice) - [NamedToolChoiceFunction](julep/api/types/named_tool_choice_function.md#namedtoolchoicefunction) + - [PartialFunctionDef](julep/api/types/partial_function_def.md#partialfunctiondef) + - [PatchAgentRequestMetadata](julep/api/types/patch_agent_request_metadata.md#patchagentrequestmetadata) + - [PatchSessionRequestMetadata](julep/api/types/patch_session_request_metadata.md#patchsessionrequestmetadata) + - [PatchUserRequestMetadata](julep/api/types/patch_user_request_metadata.md#patchuserrequestmetadata) - [ResourceCreatedResponse](julep/api/types/resource_created_response.md#resourcecreatedresponse) - [ResourceDeletedResponse](julep/api/types/resource_deleted_response.md#resourcedeletedresponse) - [ResourceUpdatedResponse](julep/api/types/resource_updated_response.md#resourceupdatedresponse) - [Session](julep/api/types/session.md#session) + - [SessionMetadata](julep/api/types/session_metadata.md#sessionmetadata) - [Suggestion](julep/api/types/suggestion.md#suggestion) - [SuggestionTarget](julep/api/types/suggestion_target.md#suggestiontarget) - [Tool](julep/api/types/tool.md#tool) - [Tool Choice Option](julep/api/types/tool_choice_option.md#tool-choice-option) - [ToolType](julep/api/types/tool_type.md#tooltype) + - [UpdateAgentRequestMetadata](julep/api/types/update_agent_request_metadata.md#updateagentrequestmetadata) + - [UpdateSessionRequestMetadata](julep/api/types/update_session_request_metadata.md#updatesessionrequestmetadata) + - [UpdateUserRequestMetadata](julep/api/types/update_user_request_metadata.md#updateuserrequestmetadata) - [User](julep/api/types/user.md#user) + - [UserMetadata](julep/api/types/user_metadata.md#usermetadata) - [Client](julep/client.md#client) - [Env](julep/env.md#env) - [Managers](julep/managers/index.md#managers) diff --git a/docs/python-sdk-docs/julep/api/client.md b/docs/python-sdk-docs/julep/api/client.md index 7e3444022..6f74269d2 100644 --- a/docs/python-sdk-docs/julep/api/client.md +++ b/docs/python-sdk-docs/julep/api/client.md @@ -15,7 +15,7 @@ ## AsyncJulepApi -[Show source in client.py:1444](../../../../../../julep/api/client.py#L1444) +[Show source in client.py:1828](../../../../../../julep/api/client.py#L1828) #### Signature @@ -33,7 +33,7 @@ class AsyncJulepApi: ### AsyncJulepApi().chat -[Show source in client.py:1909](../../../../../../julep/api/client.py#L1909) +[Show source in client.py:2460](../../../../../../julep/api/client.py#L2460) #### Arguments @@ -77,11 +77,13 @@ Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the m - `-` *min_p* - typing.Optional[float]. Minimum probability compared to leading token to be considered -- `-` *preset* - typing.Optional[ChatSettingsPreset]. Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual) +- `-` *preset* - typing.Optional[ChatSettingsPreset]. Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual) - `-` *recall* - typing.Optional[bool]. Whether previous memories should be recalled or not - - `-` *remember* - typing.Optional[bool]. Whether this interaction should be recorded in memory or not +- `-` *record* - typing.Optional[bool]. Whether this interaction should be recorded in history or not + + - `-` *remember* - typing.Optional[bool]. Whether this interaction should form memories or not --- from julep import InputChatMlMessage, InputChatMlMessageRole from julep.client import AsyncJulepApi @@ -124,6 +126,7 @@ async def chat( min_p: typing.Optional[float] = OMIT, preset: typing.Optional[ChatSettingsPreset] = OMIT, recall: typing.Optional[bool] = OMIT, + record: typing.Optional[bool] = OMIT, remember: typing.Optional[bool] = OMIT, ) -> ChatResponse: ... ``` @@ -134,7 +137,7 @@ async def chat( ### AsyncJulepApi().create_agent -[Show source in client.py:1651](../../../../../../julep/api/client.py#L1651) +[Show source in client.py:2109](../../../../../../julep/api/client.py#L2109) Create a new agent @@ -142,17 +145,19 @@ Create a new agent - `-` *name* - str. Name of the agent -- `-` *about* - str. About the agent +- `-` *about* - typing.Optional[str]. About the agent -- `-` *instructions* - typing.Optional[typing.List[Instruction]]. List of instructions for the agent +- `-` *instructions* - typing.Optional[typing.List[str]]. List of instructions for the agent - `-` *tools* - typing.Optional[typing.List[CreateToolRequest]]. A list of tools the model may call. Currently, only `function`s are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. - `-` *default_settings* - typing.Optional[AgentDefaultSettings]. Default model settings to start every session with -- `-` *model* - str. Name of the model that the agent is supposed to use +- `-` *model* - typing.Optional[str]. Name of the model that the agent is supposed to use - - `-` *docs* - typing.Optional[typing.List[CreateDoc]]. List of docs about agent +- `-` *docs* - typing.Optional[typing.List[CreateDoc]]. List of docs about agent + + - `-` *metadata* - typing.Optional[CreateAgentRequestMetadata]. (Optional) metadata --- from julep.client import AsyncJulepApi @@ -161,8 +166,6 @@ client = AsyncJulepApi( ) await client.create_agent( name="name", - about="about", - model="model", ) #### Signature @@ -171,12 +174,13 @@ await client.create_agent( async def create_agent( self, name: str, - about: str, - instructions: typing.Optional[typing.List[Instruction]] = OMIT, + about: typing.Optional[str] = OMIT, + instructions: typing.Optional[typing.List[str]] = OMIT, tools: typing.Optional[typing.List[CreateToolRequest]] = OMIT, default_settings: typing.Optional[AgentDefaultSettings] = OMIT, - model: str, + model: typing.Optional[str] = OMIT, docs: typing.Optional[typing.List[CreateDoc]] = OMIT, + metadata: typing.Optional[CreateAgentRequestMetadata] = OMIT, ) -> ResourceCreatedResponse: ... ``` @@ -186,7 +190,7 @@ async def create_agent( ### AsyncJulepApi().create_agent_doc -[Show source in client.py:2399](../../../../../../julep/api/client.py#L2399) +[Show source in client.py:3090](../../../../../../julep/api/client.py#L3090) #### Arguments @@ -218,7 +222,7 @@ async def create_agent_doc( ### AsyncJulepApi().create_agent_tool -[Show source in client.py:2677](../../../../../../julep/api/client.py#L2677) +[Show source in client.py:3385](../../../../../../julep/api/client.py#L3385) #### Arguments @@ -253,17 +257,19 @@ async def create_agent_tool( ### AsyncJulepApi().create_session -[Show source in client.py:1495](../../../../../../julep/api/client.py#L1495) +[Show source in client.py:1901](../../../../../../julep/api/client.py#L1901) Create a session between an agent and a user #### Arguments -- `-` *user_id* - str. User ID of user to associate with this session +- `-` *user_id* - typing.Optional[str]. (Optional) User ID of user to associate with this session - `-` *agent_id* - str. Agent ID of agent to associate with this session - - `-` *situation* - typing.Optional[str]. A specific situation that sets the background for this session +- `-` *situation* - typing.Optional[str]. A specific situation that sets the background for this session + + - `-` *metadata* - typing.Optional[CreateSessionRequestMetadata]. Optional metadata --- from julep.client import AsyncJulepApi @@ -271,7 +277,6 @@ client = AsyncJulepApi( api_key="YOUR_API_KEY", ) await client.create_session( - user_id="user_id", agent_id="agent_id", ) @@ -279,7 +284,11 @@ await client.create_session( ```python async def create_session( - self, user_id: str, agent_id: str, situation: typing.Optional[str] = OMIT + self, + user_id: typing.Optional[str] = OMIT, + agent_id: str, + situation: typing.Optional[str] = OMIT, + metadata: typing.Optional[CreateSessionRequestMetadata] = OMIT, ) -> ResourceCreatedResponse: ... ``` @@ -289,7 +298,7 @@ async def create_session( ### AsyncJulepApi().create_user -[Show source in client.py:1572](../../../../../../julep/api/client.py#L1572) +[Show source in client.py:2005](../../../../../../julep/api/client.py#L2005) Create a new user @@ -299,7 +308,9 @@ Create a new user - `-` *about* - typing.Optional[str]. About the user - - `-` *docs* - typing.Optional[typing.List[CreateDoc]]. List of docs about user +- `-` *docs* - typing.Optional[typing.List[CreateDoc]]. List of docs about user + + - `-` *metadata* - typing.Optional[CreateUserRequestMetadata]. (Optional) metadata --- from julep.client import AsyncJulepApi @@ -316,6 +327,7 @@ async def create_user( name: typing.Optional[str] = OMIT, about: typing.Optional[str] = OMIT, docs: typing.Optional[typing.List[CreateDoc]] = OMIT, + metadata: typing.Optional[CreateUserRequestMetadata] = OMIT, ) -> ResourceCreatedResponse: ... ``` @@ -325,7 +337,7 @@ async def create_user( ### AsyncJulepApi().create_user_doc -[Show source in client.py:2484](../../../../../../julep/api/client.py#L2484) +[Show source in client.py:3192](../../../../../../julep/api/client.py#L3192) #### Arguments @@ -357,7 +369,7 @@ async def create_user_doc( ### AsyncJulepApi().delete_agent -[Show source in client.py:2324](../../../../../../julep/api/client.py#L2324) +[Show source in client.py:2930](../../../../../../julep/api/client.py#L2930) #### Arguments @@ -380,7 +392,7 @@ async def delete_agent(self, agent_id: str) -> None: ... ### AsyncJulepApi().delete_agent_doc -[Show source in client.py:2562](../../../../../../julep/api/client.py#L2562) +[Show source in client.py:3270](../../../../../../julep/api/client.py#L3270) #### Arguments @@ -406,7 +418,7 @@ async def delete_agent_doc(self, agent_id: str, doc_id: str) -> None: ... ### AsyncJulepApi().delete_agent_memory -[Show source in client.py:2598](../../../../../../julep/api/client.py#L2598) +[Show source in client.py:3306](../../../../../../julep/api/client.py#L3306) #### Arguments @@ -432,7 +444,7 @@ async def delete_agent_memory(self, agent_id: str, memory_id: str) -> None: ... ### AsyncJulepApi().delete_agent_tool -[Show source in client.py:2768](../../../../../../julep/api/client.py#L2768) +[Show source in client.py:3476](../../../../../../julep/api/client.py#L3476) #### Arguments @@ -458,7 +470,7 @@ async def delete_agent_tool(self, agent_id: str, tool_id: str) -> None: ... ### AsyncJulepApi().delete_session -[Show source in client.py:1789](../../../../../../julep/api/client.py#L1789) +[Show source in client.py:2259](../../../../../../julep/api/client.py#L2259) #### Arguments @@ -479,9 +491,32 @@ await client.delete_session( async def delete_session(self, session_id: str) -> None: ... ``` +### AsyncJulepApi().delete_session_history + +[Show source in client.py:2427](../../../../../../julep/api/client.py#L2427) + +#### Arguments + + - `-` *session_id* - str. +--- +from julep.client import AsyncJulepApi + +client = AsyncJulepApi( + api_key="YOUR_API_KEY", +) +await client.delete_session_history( + session_id="session_id", +) + +#### Signature + +```python +async def delete_session_history(self, session_id: str) -> None: ... +``` + ### AsyncJulepApi().delete_user -[Show source in client.py:2197](../../../../../../julep/api/client.py#L2197) +[Show source in client.py:2747](../../../../../../julep/api/client.py#L2747) #### Arguments @@ -504,7 +539,7 @@ async def delete_user(self, user_id: str) -> None: ... ### AsyncJulepApi().delete_user_doc -[Show source in client.py:2526](../../../../../../julep/api/client.py#L2526) +[Show source in client.py:3234](../../../../../../julep/api/client.py#L3234) #### Arguments @@ -530,7 +565,7 @@ async def delete_user_doc(self, user_id: str, doc_id: str) -> None: ... ### AsyncJulepApi().get_agent -[Show source in client.py:2229](../../../../../../julep/api/client.py#L2229) +[Show source in client.py:2832](../../../../../../julep/api/client.py#L2832) #### Arguments @@ -553,7 +588,7 @@ async def get_agent(self, agent_id: str) -> Agent: ... ### AsyncJulepApi().get_agent_docs -[Show source in client.py:2356](../../../../../../julep/api/client.py#L2356) +[Show source in client.py:3030](../../../../../../julep/api/client.py#L3030) Sorted (created_at descending) @@ -563,7 +598,13 @@ Sorted (created_at descending) - `-` *limit* - typing.Optional[int]. - - `-` *offset* - typing.Optional[int]. +- `-` *offset* - typing.Optional[int]. + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[GetAgentDocsRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[GetAgentDocsRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import AsyncJulepApi @@ -582,12 +623,15 @@ async def get_agent_docs( agent_id: str, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[GetAgentDocsRequestSortBy] = None, + order: typing.Optional[GetAgentDocsRequestOrder] = None, ) -> GetAgentDocsResponse: ... ``` ### AsyncJulepApi().get_agent_memories -[Show source in client.py:2056](../../../../../../julep/api/client.py#L2056) +[Show source in client.py:2612](../../../../../../julep/api/client.py#L2612) Sorted (created_at descending) @@ -597,8 +641,6 @@ Sorted (created_at descending) - `-` *query* - str. -- `-` *types* - typing.Optional[typing.Union[str, typing.List[str]]]. episode, belief, entity - - `-` *user_id* - typing.Optional[str]. - `-` *limit* - typing.Optional[int]. @@ -622,7 +664,6 @@ async def get_agent_memories( self, agent_id: str, query: str, - types: typing.Optional[typing.Union[str, typing.List[str]]] = None, user_id: typing.Optional[str] = None, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, @@ -631,7 +672,7 @@ async def get_agent_memories( ### AsyncJulepApi().get_agent_tools -[Show source in client.py:2634](../../../../../../julep/api/client.py#L2634) +[Show source in client.py:3342](../../../../../../julep/api/client.py#L3342) Sorted (created_at descending) @@ -665,7 +706,7 @@ async def get_agent_tools( ### AsyncJulepApi().get_history -[Show source in client.py:1865](../../../../../../julep/api/client.py#L1865) +[Show source in client.py:2383](../../../../../../julep/api/client.py#L2383) Sorted (created_at ascending) @@ -699,7 +740,7 @@ async def get_history( ### AsyncJulepApi().get_job_status -[Show source in client.py:2804](../../../../../../julep/api/client.py#L2804) +[Show source in client.py:3555](../../../../../../julep/api/client.py#L3555) #### Arguments @@ -722,7 +763,7 @@ async def get_job_status(self, job_id: str) -> JobStatus: ... ### AsyncJulepApi().get_session -[Show source in client.py:1719](../../../../../../julep/api/client.py#L1719) +[Show source in client.py:2180](../../../../../../julep/api/client.py#L2180) #### Arguments @@ -745,7 +786,7 @@ async def get_session(self, session_id: str) -> Session: ... ### AsyncJulepApi().get_suggestions -[Show source in client.py:1821](../../../../../../julep/api/client.py#L1821) +[Show source in client.py:2339](../../../../../../julep/api/client.py#L2339) Sorted (created_at descending) @@ -779,7 +820,7 @@ async def get_suggestions( ### AsyncJulepApi().get_user -[Show source in client.py:2117](../../../../../../julep/api/client.py#L2117) +[Show source in client.py:2664](../../../../../../julep/api/client.py#L2664) #### Arguments @@ -802,7 +843,7 @@ async def get_user(self, user_id: str) -> User: ... ### AsyncJulepApi().get_user_docs -[Show source in client.py:2441](../../../../../../julep/api/client.py#L2441) +[Show source in client.py:3132](../../../../../../julep/api/client.py#L3132) Sorted (created_at descending) @@ -812,7 +853,13 @@ Sorted (created_at descending) - `-` *limit* - typing.Optional[int]. - - `-` *offset* - typing.Optional[int]. +- `-` *offset* - typing.Optional[int]. + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[GetUserDocsRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[GetUserDocsRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import AsyncJulepApi @@ -831,20 +878,29 @@ async def get_user_docs( user_id: str, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[GetUserDocsRequestSortBy] = None, + order: typing.Optional[GetUserDocsRequestOrder] = None, ) -> GetUserDocsResponse: ... ``` ### AsyncJulepApi().list_agents -[Show source in client.py:1618](../../../../../../julep/api/client.py#L1618) +[Show source in client.py:2056](../../../../../../julep/api/client.py#L2056) -List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) +List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) #### Arguments - `-` *limit* - typing.Optional[int]. Number of items to return - - `-` *offset* - typing.Optional[int]. Number of items to skip (sorted created_at descending order) +- `-` *offset* - typing.Optional[int]. Number of items to skip (sorted created_at descending order) + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[ListAgentsRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[ListAgentsRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import AsyncJulepApi @@ -857,21 +913,32 @@ await client.list_agents() ```python async def list_agents( - self, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None + self, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[ListAgentsRequestSortBy] = None, + order: typing.Optional[ListAgentsRequestOrder] = None, ) -> ListAgentsResponse: ... ``` ### AsyncJulepApi().list_sessions -[Show source in client.py:1462](../../../../../../julep/api/client.py#L1462) +[Show source in client.py:1848](../../../../../../julep/api/client.py#L1848) -List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) +List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) #### Arguments - `-` *limit* - typing.Optional[int]. Number of sessions to return - - `-` *offset* - typing.Optional[int]. Number of sessions to skip (sorted created_at descending order) +- `-` *offset* - typing.Optional[int]. Number of sessions to skip (sorted created_at descending order) + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[ListSessionsRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[ListSessionsRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import AsyncJulepApi @@ -884,21 +951,32 @@ await client.list_sessions() ```python async def list_sessions( - self, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None + self, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[ListSessionsRequestSortBy] = None, + order: typing.Optional[ListSessionsRequestOrder] = None, ) -> ListSessionsResponse: ... ``` ### AsyncJulepApi().list_users -[Show source in client.py:1539](../../../../../../julep/api/client.py#L1539) +[Show source in client.py:1952](../../../../../../julep/api/client.py#L1952) -List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) +List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) #### Arguments - `-` *limit* - typing.Optional[int]. Number of items to return - - `-` *offset* - typing.Optional[int]. Number of items to skip (sorted created_at descending order) +- `-` *offset* - typing.Optional[int]. Number of items to skip (sorted created_at descending order) + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[ListUsersRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[ListUsersRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import AsyncJulepApi @@ -911,13 +989,18 @@ await client.list_users() ```python async def list_users( - self, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None + self, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[ListUsersRequestSortBy] = None, + order: typing.Optional[ListUsersRequestOrder] = None, ) -> ListUsersResponse: ... ``` -### AsyncJulepApi().update_agent +### AsyncJulepApi().patch_agent -[Show source in client.py:2261](../../../../../../julep/api/client.py#L2261) +[Show source in client.py:2962](../../../../../../julep/api/client.py#L2962) #### Arguments @@ -925,34 +1008,194 @@ async def list_users( - `-` *about* - typing.Optional[str]. About the agent -- `-` *instructions* - typing.Optional[typing.List[Instruction]]. List of instructions for the agent +- `-` *instructions* - typing.Optional[typing.List[str]]. List of instructions for the agent - `-` *name* - typing.Optional[str]. Name of the agent - `-` *model* - typing.Optional[str]. Name of the model that the agent is supposed to use - - `-` *default_settings* - typing.Optional[AgentDefaultSettings]. Default model settings to start every session with +- `-` *default_settings* - typing.Optional[AgentDefaultSettings]. Default model settings to start every session with + + - `-` *metadata* - typing.Optional[PatchAgentRequestMetadata]. Optional metadata --- from julep.client import AsyncJulepApi client = AsyncJulepApi( api_key="YOUR_API_KEY", ) -await client.update_agent( +await client.patch_agent( agent_id="agent_id", ) #### Signature ```python -async def update_agent( +async def patch_agent( self, agent_id: str, about: typing.Optional[str] = OMIT, - instructions: typing.Optional[typing.List[Instruction]] = OMIT, + instructions: typing.Optional[typing.List[str]] = OMIT, + name: typing.Optional[str] = OMIT, + model: typing.Optional[str] = OMIT, + default_settings: typing.Optional[AgentDefaultSettings] = OMIT, + metadata: typing.Optional[PatchAgentRequestMetadata] = OMIT, +) -> ResourceUpdatedResponse: ... +``` + +#### See also + +- [OMIT](#omit) + +### AsyncJulepApi().patch_agent_tool + +[Show source in client.py:3512](../../../../../../julep/api/client.py#L3512) + +#### Arguments + +- `-` *agent_id* - str. + +- `-` *tool_id* - str. + + - `-` *function* - PartialFunctionDef. Function definition and parameters +--- +from julep import PartialFunctionDef +from julep.client import AsyncJulepApi + +client = AsyncJulepApi( + api_key="YOUR_API_KEY", +) +await client.patch_agent_tool( + agent_id="agent_id", + tool_id="tool_id", + function=PartialFunctionDef(), +) + +#### Signature + +```python +async def patch_agent_tool( + self, agent_id: str, tool_id: str, function: PartialFunctionDef +) -> ResourceUpdatedResponse: ... +``` + +### AsyncJulepApi().patch_session + +[Show source in client.py:2291](../../../../../../julep/api/client.py#L2291) + +#### Arguments + +- `-` *session_id* - str. + +- `-` *situation* - typing.Optional[str]. Updated situation for this session + + - `-` *metadata* - typing.Optional[PatchSessionRequestMetadata]. Optional metadata +--- +from julep.client import AsyncJulepApi + +client = AsyncJulepApi( + api_key="YOUR_API_KEY", +) +await client.patch_session( + session_id="session_id", +) + +#### Signature + +```python +async def patch_session( + self, + session_id: str, + situation: typing.Optional[str] = OMIT, + metadata: typing.Optional[PatchSessionRequestMetadata] = OMIT, +) -> ResourceUpdatedResponse: ... +``` + +#### See also + +- [OMIT](#omit) + +### AsyncJulepApi().patch_user + +[Show source in client.py:2779](../../../../../../julep/api/client.py#L2779) + +#### Arguments + +- `-` *user_id* - str. + +- `-` *about* - typing.Optional[str]. About the user + +- `-` *name* - typing.Optional[str]. Name of the user + + - `-` *metadata* - typing.Optional[PatchUserRequestMetadata]. Optional metadata +--- +from julep.client import AsyncJulepApi + +client = AsyncJulepApi( + api_key="YOUR_API_KEY", +) +await client.patch_user( + user_id="user_id", +) + +#### Signature + +```python +async def patch_user( + self, + user_id: str, + about: typing.Optional[str] = OMIT, name: typing.Optional[str] = OMIT, + metadata: typing.Optional[PatchUserRequestMetadata] = OMIT, +) -> ResourceUpdatedResponse: ... +``` + +#### See also + +- [OMIT](#omit) + +### AsyncJulepApi().update_agent + +[Show source in client.py:2864](../../../../../../julep/api/client.py#L2864) + +#### Arguments + +- `-` *agent_id* - str. + +- `-` *about* - str. About the agent + +- `-` *instructions* - typing.Optional[typing.List[str]]. List of instructions for the agent + +- `-` *name* - str. Name of the agent + +- `-` *model* - typing.Optional[str]. Name of the model that the agent is supposed to use + +- `-` *default_settings* - typing.Optional[AgentDefaultSettings]. Default model settings to start every session with + + - `-` *metadata* - typing.Optional[UpdateAgentRequestMetadata]. Optional metadata +--- +from julep.client import AsyncJulepApi + +client = AsyncJulepApi( + api_key="YOUR_API_KEY", +) +await client.update_agent( + agent_id="agent_id", + about="about", + name="name", +) + +#### Signature + +```python +async def update_agent( + self, + agent_id: str, + about: str, + instructions: typing.Optional[typing.List[str]] = OMIT, + name: str, model: typing.Optional[str] = OMIT, default_settings: typing.Optional[AgentDefaultSettings] = OMIT, + metadata: typing.Optional[UpdateAgentRequestMetadata] = OMIT, ) -> ResourceUpdatedResponse: ... ``` @@ -962,7 +1205,7 @@ async def update_agent( ### AsyncJulepApi().update_agent_tool -[Show source in client.py:2722](../../../../../../julep/api/client.py#L2722) +[Show source in client.py:3430](../../../../../../julep/api/client.py#L3430) #### Arguments @@ -997,13 +1240,15 @@ async def update_agent_tool( ### AsyncJulepApi().update_session -[Show source in client.py:1751](../../../../../../julep/api/client.py#L1751) +[Show source in client.py:2212](../../../../../../julep/api/client.py#L2212) #### Arguments - `-` *session_id* - str. - - `-` *situation* - str. Updated situation for this session +- `-` *situation* - str. Updated situation for this session + + - `-` *metadata* - typing.Optional[UpdateSessionRequestMetadata]. Optional metadata --- from julep.client import AsyncJulepApi @@ -1019,21 +1264,30 @@ await client.update_session( ```python async def update_session( - self, session_id: str, situation: str + self, + session_id: str, + situation: str, + metadata: typing.Optional[UpdateSessionRequestMetadata] = OMIT, ) -> ResourceUpdatedResponse: ... ``` +#### See also + +- [OMIT](#omit) + ### AsyncJulepApi().update_user -[Show source in client.py:2149](../../../../../../julep/api/client.py#L2149) +[Show source in client.py:2696](../../../../../../julep/api/client.py#L2696) #### Arguments - `-` *user_id* - str. -- `-` *about* - typing.Optional[str]. About the user +- `-` *about* - str. About the user + +- `-` *name* - str. Name of the user - - `-` *name* - typing.Optional[str]. Name of the user + - `-` *metadata* - typing.Optional[UpdateUserRequestMetadata]. Optional metadata --- from julep.client import AsyncJulepApi @@ -1042,6 +1296,8 @@ client = AsyncJulepApi( ) await client.update_user( user_id="user_id", + about="about", + name="name", ) #### Signature @@ -1050,8 +1306,9 @@ await client.update_user( async def update_user( self, user_id: str, - about: typing.Optional[str] = OMIT, - name: typing.Optional[str] = OMIT, + about: str, + name: str, + metadata: typing.Optional[UpdateUserRequestMetadata] = OMIT, ) -> ResourceUpdatedResponse: ... ``` @@ -1063,7 +1320,7 @@ async def update_user( ## JulepApi -[Show source in client.py:51](../../../../../../julep/api/client.py#L51) +[Show source in client.py:70](../../../../../../julep/api/client.py#L70) #### Signature @@ -1081,7 +1338,7 @@ class JulepApi: ### JulepApi().chat -[Show source in client.py:516](../../../../../../julep/api/client.py#L516) +[Show source in client.py:700](../../../../../../julep/api/client.py#L700) #### Arguments @@ -1125,11 +1382,13 @@ Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the m - `-` *min_p* - typing.Optional[float]. Minimum probability compared to leading token to be considered -- `-` *preset* - typing.Optional[ChatSettingsPreset]. Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual) +- `-` *preset* - typing.Optional[ChatSettingsPreset]. Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual) - `-` *recall* - typing.Optional[bool]. Whether previous memories should be recalled or not - - `-` *remember* - typing.Optional[bool]. Whether this interaction should be recorded in memory or not +- `-` *record* - typing.Optional[bool]. Whether this interaction should be recorded in history or not + + - `-` *remember* - typing.Optional[bool]. Whether this interaction should form memories or not --- from julep import InputChatMlMessage, InputChatMlMessageRole from julep.client import JulepApi @@ -1172,6 +1431,7 @@ def chat( min_p: typing.Optional[float] = OMIT, preset: typing.Optional[ChatSettingsPreset] = OMIT, recall: typing.Optional[bool] = OMIT, + record: typing.Optional[bool] = OMIT, remember: typing.Optional[bool] = OMIT, ) -> ChatResponse: ... ``` @@ -1182,7 +1442,7 @@ def chat( ### JulepApi().create_agent -[Show source in client.py:258](../../../../../../julep/api/client.py#L258) +[Show source in client.py:349](../../../../../../julep/api/client.py#L349) Create a new agent @@ -1190,17 +1450,19 @@ Create a new agent - `-` *name* - str. Name of the agent -- `-` *about* - str. About the agent +- `-` *about* - typing.Optional[str]. About the agent -- `-` *instructions* - typing.Optional[typing.List[Instruction]]. List of instructions for the agent +- `-` *instructions* - typing.Optional[typing.List[str]]. List of instructions for the agent - `-` *tools* - typing.Optional[typing.List[CreateToolRequest]]. A list of tools the model may call. Currently, only `function`s are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. - `-` *default_settings* - typing.Optional[AgentDefaultSettings]. Default model settings to start every session with -- `-` *model* - str. Name of the model that the agent is supposed to use +- `-` *model* - typing.Optional[str]. Name of the model that the agent is supposed to use - - `-` *docs* - typing.Optional[typing.List[CreateDoc]]. List of docs about agent +- `-` *docs* - typing.Optional[typing.List[CreateDoc]]. List of docs about agent + + - `-` *metadata* - typing.Optional[CreateAgentRequestMetadata]. (Optional) metadata --- from julep.client import JulepApi @@ -1209,8 +1471,6 @@ client = JulepApi( ) client.create_agent( name="name", - about="about", - model="model", ) #### Signature @@ -1219,12 +1479,13 @@ client.create_agent( def create_agent( self, name: str, - about: str, - instructions: typing.Optional[typing.List[Instruction]] = OMIT, + about: typing.Optional[str] = OMIT, + instructions: typing.Optional[typing.List[str]] = OMIT, tools: typing.Optional[typing.List[CreateToolRequest]] = OMIT, default_settings: typing.Optional[AgentDefaultSettings] = OMIT, - model: str, + model: typing.Optional[str] = OMIT, docs: typing.Optional[typing.List[CreateDoc]] = OMIT, + metadata: typing.Optional[CreateAgentRequestMetadata] = OMIT, ) -> ResourceCreatedResponse: ... ``` @@ -1234,7 +1495,7 @@ def create_agent( ### JulepApi().create_agent_doc -[Show source in client.py:1006](../../../../../../julep/api/client.py#L1006) +[Show source in client.py:1330](../../../../../../julep/api/client.py#L1330) #### Arguments @@ -1266,7 +1527,7 @@ def create_agent_doc( ### JulepApi().create_agent_tool -[Show source in client.py:1284](../../../../../../julep/api/client.py#L1284) +[Show source in client.py:1625](../../../../../../julep/api/client.py#L1625) #### Arguments @@ -1301,17 +1562,19 @@ def create_agent_tool( ### JulepApi().create_session -[Show source in client.py:102](../../../../../../julep/api/client.py#L102) +[Show source in client.py:141](../../../../../../julep/api/client.py#L141) Create a session between an agent and a user #### Arguments -- `-` *user_id* - str. User ID of user to associate with this session +- `-` *user_id* - typing.Optional[str]. (Optional) User ID of user to associate with this session - `-` *agent_id* - str. Agent ID of agent to associate with this session - - `-` *situation* - typing.Optional[str]. A specific situation that sets the background for this session +- `-` *situation* - typing.Optional[str]. A specific situation that sets the background for this session + + - `-` *metadata* - typing.Optional[CreateSessionRequestMetadata]. Optional metadata --- from julep.client import JulepApi @@ -1319,7 +1582,6 @@ client = JulepApi( api_key="YOUR_API_KEY", ) client.create_session( - user_id="user_id", agent_id="agent_id", ) @@ -1327,7 +1589,11 @@ client.create_session( ```python def create_session( - self, user_id: str, agent_id: str, situation: typing.Optional[str] = OMIT + self, + user_id: typing.Optional[str] = OMIT, + agent_id: str, + situation: typing.Optional[str] = OMIT, + metadata: typing.Optional[CreateSessionRequestMetadata] = OMIT, ) -> ResourceCreatedResponse: ... ``` @@ -1337,7 +1603,7 @@ def create_session( ### JulepApi().create_user -[Show source in client.py:179](../../../../../../julep/api/client.py#L179) +[Show source in client.py:245](../../../../../../julep/api/client.py#L245) Create a new user @@ -1347,7 +1613,9 @@ Create a new user - `-` *about* - typing.Optional[str]. About the user - - `-` *docs* - typing.Optional[typing.List[CreateDoc]]. List of docs about user +- `-` *docs* - typing.Optional[typing.List[CreateDoc]]. List of docs about user + + - `-` *metadata* - typing.Optional[CreateUserRequestMetadata]. (Optional) metadata --- from julep.client import JulepApi @@ -1364,6 +1632,7 @@ def create_user( name: typing.Optional[str] = OMIT, about: typing.Optional[str] = OMIT, docs: typing.Optional[typing.List[CreateDoc]] = OMIT, + metadata: typing.Optional[CreateUserRequestMetadata] = OMIT, ) -> ResourceCreatedResponse: ... ``` @@ -1373,7 +1642,7 @@ def create_user( ### JulepApi().create_user_doc -[Show source in client.py:1091](../../../../../../julep/api/client.py#L1091) +[Show source in client.py:1432](../../../../../../julep/api/client.py#L1432) #### Arguments @@ -1405,7 +1674,7 @@ def create_user_doc( ### JulepApi().delete_agent -[Show source in client.py:931](../../../../../../julep/api/client.py#L931) +[Show source in client.py:1170](../../../../../../julep/api/client.py#L1170) #### Arguments @@ -1428,7 +1697,7 @@ def delete_agent(self, agent_id: str) -> None: ... ### JulepApi().delete_agent_doc -[Show source in client.py:1169](../../../../../../julep/api/client.py#L1169) +[Show source in client.py:1510](../../../../../../julep/api/client.py#L1510) #### Arguments @@ -1454,7 +1723,7 @@ def delete_agent_doc(self, agent_id: str, doc_id: str) -> None: ... ### JulepApi().delete_agent_memory -[Show source in client.py:1205](../../../../../../julep/api/client.py#L1205) +[Show source in client.py:1546](../../../../../../julep/api/client.py#L1546) #### Arguments @@ -1480,7 +1749,7 @@ def delete_agent_memory(self, agent_id: str, memory_id: str) -> None: ... ### JulepApi().delete_agent_tool -[Show source in client.py:1375](../../../../../../julep/api/client.py#L1375) +[Show source in client.py:1716](../../../../../../julep/api/client.py#L1716) #### Arguments @@ -1506,7 +1775,7 @@ def delete_agent_tool(self, agent_id: str, tool_id: str) -> None: ... ### JulepApi().delete_session -[Show source in client.py:396](../../../../../../julep/api/client.py#L396) +[Show source in client.py:499](../../../../../../julep/api/client.py#L499) #### Arguments @@ -1527,9 +1796,32 @@ client.delete_session( def delete_session(self, session_id: str) -> None: ... ``` +### JulepApi().delete_session_history + +[Show source in client.py:667](../../../../../../julep/api/client.py#L667) + +#### Arguments + + - `-` *session_id* - str. +--- +from julep.client import JulepApi + +client = JulepApi( + api_key="YOUR_API_KEY", +) +client.delete_session_history( + session_id="session_id", +) + +#### Signature + +```python +def delete_session_history(self, session_id: str) -> None: ... +``` + ### JulepApi().delete_user -[Show source in client.py:804](../../../../../../julep/api/client.py#L804) +[Show source in client.py:987](../../../../../../julep/api/client.py#L987) #### Arguments @@ -1552,7 +1844,7 @@ def delete_user(self, user_id: str) -> None: ... ### JulepApi().delete_user_doc -[Show source in client.py:1133](../../../../../../julep/api/client.py#L1133) +[Show source in client.py:1474](../../../../../../julep/api/client.py#L1474) #### Arguments @@ -1578,7 +1870,7 @@ def delete_user_doc(self, user_id: str, doc_id: str) -> None: ... ### JulepApi().get_agent -[Show source in client.py:836](../../../../../../julep/api/client.py#L836) +[Show source in client.py:1072](../../../../../../julep/api/client.py#L1072) #### Arguments @@ -1601,7 +1893,7 @@ def get_agent(self, agent_id: str) -> Agent: ... ### JulepApi().get_agent_docs -[Show source in client.py:963](../../../../../../julep/api/client.py#L963) +[Show source in client.py:1270](../../../../../../julep/api/client.py#L1270) Sorted (created_at descending) @@ -1611,7 +1903,13 @@ Sorted (created_at descending) - `-` *limit* - typing.Optional[int]. - - `-` *offset* - typing.Optional[int]. +- `-` *offset* - typing.Optional[int]. + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[GetAgentDocsRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[GetAgentDocsRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import JulepApi @@ -1630,12 +1928,15 @@ def get_agent_docs( agent_id: str, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[GetAgentDocsRequestSortBy] = None, + order: typing.Optional[GetAgentDocsRequestOrder] = None, ) -> GetAgentDocsResponse: ... ``` ### JulepApi().get_agent_memories -[Show source in client.py:663](../../../../../../julep/api/client.py#L663) +[Show source in client.py:852](../../../../../../julep/api/client.py#L852) Sorted (created_at descending) @@ -1645,8 +1946,6 @@ Sorted (created_at descending) - `-` *query* - str. -- `-` *types* - typing.Optional[typing.Union[str, typing.List[str]]]. episode, belief, entity - - `-` *user_id* - typing.Optional[str]. - `-` *limit* - typing.Optional[int]. @@ -1670,7 +1969,6 @@ def get_agent_memories( self, agent_id: str, query: str, - types: typing.Optional[typing.Union[str, typing.List[str]]] = None, user_id: typing.Optional[str] = None, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, @@ -1679,7 +1977,7 @@ def get_agent_memories( ### JulepApi().get_agent_tools -[Show source in client.py:1241](../../../../../../julep/api/client.py#L1241) +[Show source in client.py:1582](../../../../../../julep/api/client.py#L1582) Sorted (created_at descending) @@ -1713,7 +2011,7 @@ def get_agent_tools( ### JulepApi().get_history -[Show source in client.py:472](../../../../../../julep/api/client.py#L472) +[Show source in client.py:623](../../../../../../julep/api/client.py#L623) Sorted (created_at ascending) @@ -1747,7 +2045,7 @@ def get_history( ### JulepApi().get_job_status -[Show source in client.py:1411](../../../../../../julep/api/client.py#L1411) +[Show source in client.py:1795](../../../../../../julep/api/client.py#L1795) #### Arguments @@ -1770,7 +2068,7 @@ def get_job_status(self, job_id: str) -> JobStatus: ... ### JulepApi().get_session -[Show source in client.py:326](../../../../../../julep/api/client.py#L326) +[Show source in client.py:420](../../../../../../julep/api/client.py#L420) #### Arguments @@ -1793,7 +2091,7 @@ def get_session(self, session_id: str) -> Session: ... ### JulepApi().get_suggestions -[Show source in client.py:428](../../../../../../julep/api/client.py#L428) +[Show source in client.py:579](../../../../../../julep/api/client.py#L579) Sorted (created_at descending) @@ -1827,7 +2125,7 @@ def get_suggestions( ### JulepApi().get_user -[Show source in client.py:724](../../../../../../julep/api/client.py#L724) +[Show source in client.py:904](../../../../../../julep/api/client.py#L904) #### Arguments @@ -1850,7 +2148,7 @@ def get_user(self, user_id: str) -> User: ... ### JulepApi().get_user_docs -[Show source in client.py:1048](../../../../../../julep/api/client.py#L1048) +[Show source in client.py:1372](../../../../../../julep/api/client.py#L1372) Sorted (created_at descending) @@ -1860,7 +2158,13 @@ Sorted (created_at descending) - `-` *limit* - typing.Optional[int]. - - `-` *offset* - typing.Optional[int]. +- `-` *offset* - typing.Optional[int]. + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[GetUserDocsRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[GetUserDocsRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import JulepApi @@ -1879,20 +2183,29 @@ def get_user_docs( user_id: str, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[GetUserDocsRequestSortBy] = None, + order: typing.Optional[GetUserDocsRequestOrder] = None, ) -> GetUserDocsResponse: ... ``` ### JulepApi().list_agents -[Show source in client.py:225](../../../../../../julep/api/client.py#L225) +[Show source in client.py:296](../../../../../../julep/api/client.py#L296) -List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) +List agents created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) #### Arguments - `-` *limit* - typing.Optional[int]. Number of items to return - - `-` *offset* - typing.Optional[int]. Number of items to skip (sorted created_at descending order) +- `-` *offset* - typing.Optional[int]. Number of items to skip (sorted created_at descending order) + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[ListAgentsRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[ListAgentsRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import JulepApi @@ -1905,21 +2218,32 @@ client.list_agents() ```python def list_agents( - self, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None + self, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[ListAgentsRequestSortBy] = None, + order: typing.Optional[ListAgentsRequestOrder] = None, ) -> ListAgentsResponse: ... ``` ### JulepApi().list_sessions -[Show source in client.py:69](../../../../../../julep/api/client.py#L69) +[Show source in client.py:88](../../../../../../julep/api/client.py#L88) -List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) +List sessions created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) #### Arguments - `-` *limit* - typing.Optional[int]. Number of sessions to return - - `-` *offset* - typing.Optional[int]. Number of sessions to skip (sorted created_at descending order) +- `-` *offset* - typing.Optional[int]. Number of sessions to skip (sorted created_at descending order) + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[ListSessionsRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[ListSessionsRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import JulepApi @@ -1932,21 +2256,32 @@ client.list_sessions() ```python def list_sessions( - self, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None + self, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[ListSessionsRequestSortBy] = None, + order: typing.Optional[ListSessionsRequestOrder] = None, ) -> ListSessionsResponse: ... ``` ### JulepApi().list_users -[Show source in client.py:146](../../../../../../julep/api/client.py#L146) +[Show source in client.py:192](../../../../../../julep/api/client.py#L192) -List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at`) +List users created (use limit/offset pagination to get large number of sessions; sorted by descending order of `created_at` by default) #### Arguments - `-` *limit* - typing.Optional[int]. Number of items to return - - `-` *offset* - typing.Optional[int]. Number of items to skip (sorted created_at descending order) +- `-` *offset* - typing.Optional[int]. Number of items to skip (sorted created_at descending order) + +- `-` *metadata_filter* - typing.Optional[str]. JSON object that should be used to filter objects by metadata + +- `-` *sort_by* - typing.Optional[ListUsersRequestSortBy]. Which field to sort by: `created_at` or `updated_at` + + - `-` *order* - typing.Optional[ListUsersRequestOrder]. Which order should the sort be: `asc` (ascending) or `desc` (descending) --- from julep.client import JulepApi @@ -1959,13 +2294,18 @@ client.list_users() ```python def list_users( - self, limit: typing.Optional[int] = None, offset: typing.Optional[int] = None + self, + limit: typing.Optional[int] = None, + offset: typing.Optional[int] = None, + metadata_filter: typing.Optional[str] = None, + sort_by: typing.Optional[ListUsersRequestSortBy] = None, + order: typing.Optional[ListUsersRequestOrder] = None, ) -> ListUsersResponse: ... ``` -### JulepApi().update_agent +### JulepApi().patch_agent -[Show source in client.py:868](../../../../../../julep/api/client.py#L868) +[Show source in client.py:1202](../../../../../../julep/api/client.py#L1202) #### Arguments @@ -1973,34 +2313,194 @@ def list_users( - `-` *about* - typing.Optional[str]. About the agent -- `-` *instructions* - typing.Optional[typing.List[Instruction]]. List of instructions for the agent +- `-` *instructions* - typing.Optional[typing.List[str]]. List of instructions for the agent - `-` *name* - typing.Optional[str]. Name of the agent - `-` *model* - typing.Optional[str]. Name of the model that the agent is supposed to use - - `-` *default_settings* - typing.Optional[AgentDefaultSettings]. Default model settings to start every session with +- `-` *default_settings* - typing.Optional[AgentDefaultSettings]. Default model settings to start every session with + + - `-` *metadata* - typing.Optional[PatchAgentRequestMetadata]. Optional metadata --- from julep.client import JulepApi client = JulepApi( api_key="YOUR_API_KEY", ) -client.update_agent( +client.patch_agent( agent_id="agent_id", ) #### Signature ```python -def update_agent( +def patch_agent( self, agent_id: str, about: typing.Optional[str] = OMIT, - instructions: typing.Optional[typing.List[Instruction]] = OMIT, + instructions: typing.Optional[typing.List[str]] = OMIT, name: typing.Optional[str] = OMIT, model: typing.Optional[str] = OMIT, default_settings: typing.Optional[AgentDefaultSettings] = OMIT, + metadata: typing.Optional[PatchAgentRequestMetadata] = OMIT, +) -> ResourceUpdatedResponse: ... +``` + +#### See also + +- [OMIT](#omit) + +### JulepApi().patch_agent_tool + +[Show source in client.py:1752](../../../../../../julep/api/client.py#L1752) + +#### Arguments + +- `-` *agent_id* - str. + +- `-` *tool_id* - str. + + - `-` *function* - PartialFunctionDef. Function definition and parameters +--- +from julep import PartialFunctionDef +from julep.client import JulepApi + +client = JulepApi( + api_key="YOUR_API_KEY", +) +client.patch_agent_tool( + agent_id="agent_id", + tool_id="tool_id", + function=PartialFunctionDef(), +) + +#### Signature + +```python +def patch_agent_tool( + self, agent_id: str, tool_id: str, function: PartialFunctionDef +) -> ResourceUpdatedResponse: ... +``` + +### JulepApi().patch_session + +[Show source in client.py:531](../../../../../../julep/api/client.py#L531) + +#### Arguments + +- `-` *session_id* - str. + +- `-` *situation* - typing.Optional[str]. Updated situation for this session + + - `-` *metadata* - typing.Optional[PatchSessionRequestMetadata]. Optional metadata +--- +from julep.client import JulepApi + +client = JulepApi( + api_key="YOUR_API_KEY", +) +client.patch_session( + session_id="session_id", +) + +#### Signature + +```python +def patch_session( + self, + session_id: str, + situation: typing.Optional[str] = OMIT, + metadata: typing.Optional[PatchSessionRequestMetadata] = OMIT, +) -> ResourceUpdatedResponse: ... +``` + +#### See also + +- [OMIT](#omit) + +### JulepApi().patch_user + +[Show source in client.py:1019](../../../../../../julep/api/client.py#L1019) + +#### Arguments + +- `-` *user_id* - str. + +- `-` *about* - typing.Optional[str]. About the user + +- `-` *name* - typing.Optional[str]. Name of the user + + - `-` *metadata* - typing.Optional[PatchUserRequestMetadata]. Optional metadata +--- +from julep.client import JulepApi + +client = JulepApi( + api_key="YOUR_API_KEY", +) +client.patch_user( + user_id="user_id", +) + +#### Signature + +```python +def patch_user( + self, + user_id: str, + about: typing.Optional[str] = OMIT, + name: typing.Optional[str] = OMIT, + metadata: typing.Optional[PatchUserRequestMetadata] = OMIT, +) -> ResourceUpdatedResponse: ... +``` + +#### See also + +- [OMIT](#omit) + +### JulepApi().update_agent + +[Show source in client.py:1104](../../../../../../julep/api/client.py#L1104) + +#### Arguments + +- `-` *agent_id* - str. + +- `-` *about* - str. About the agent + +- `-` *instructions* - typing.Optional[typing.List[str]]. List of instructions for the agent + +- `-` *name* - str. Name of the agent + +- `-` *model* - typing.Optional[str]. Name of the model that the agent is supposed to use + +- `-` *default_settings* - typing.Optional[AgentDefaultSettings]. Default model settings to start every session with + + - `-` *metadata* - typing.Optional[UpdateAgentRequestMetadata]. Optional metadata +--- +from julep.client import JulepApi + +client = JulepApi( + api_key="YOUR_API_KEY", +) +client.update_agent( + agent_id="agent_id", + about="about", + name="name", +) + +#### Signature + +```python +def update_agent( + self, + agent_id: str, + about: str, + instructions: typing.Optional[typing.List[str]] = OMIT, + name: str, + model: typing.Optional[str] = OMIT, + default_settings: typing.Optional[AgentDefaultSettings] = OMIT, + metadata: typing.Optional[UpdateAgentRequestMetadata] = OMIT, ) -> ResourceUpdatedResponse: ... ``` @@ -2010,7 +2510,7 @@ def update_agent( ### JulepApi().update_agent_tool -[Show source in client.py:1329](../../../../../../julep/api/client.py#L1329) +[Show source in client.py:1670](../../../../../../julep/api/client.py#L1670) #### Arguments @@ -2045,13 +2545,15 @@ def update_agent_tool( ### JulepApi().update_session -[Show source in client.py:358](../../../../../../julep/api/client.py#L358) +[Show source in client.py:452](../../../../../../julep/api/client.py#L452) #### Arguments - `-` *session_id* - str. - - `-` *situation* - str. Updated situation for this session +- `-` *situation* - str. Updated situation for this session + + - `-` *metadata* - typing.Optional[UpdateSessionRequestMetadata]. Optional metadata --- from julep.client import JulepApi @@ -2066,20 +2568,31 @@ client.update_session( #### Signature ```python -def update_session(self, session_id: str, situation: str) -> ResourceUpdatedResponse: ... +def update_session( + self, + session_id: str, + situation: str, + metadata: typing.Optional[UpdateSessionRequestMetadata] = OMIT, +) -> ResourceUpdatedResponse: ... ``` +#### See also + +- [OMIT](#omit) + ### JulepApi().update_user -[Show source in client.py:756](../../../../../../julep/api/client.py#L756) +[Show source in client.py:936](../../../../../../julep/api/client.py#L936) #### Arguments - `-` *user_id* - str. -- `-` *about* - typing.Optional[str]. About the user +- `-` *about* - str. About the user + +- `-` *name* - str. Name of the user - - `-` *name* - typing.Optional[str]. Name of the user + - `-` *metadata* - typing.Optional[UpdateUserRequestMetadata]. Optional metadata --- from julep.client import JulepApi @@ -2088,6 +2601,8 @@ client = JulepApi( ) client.update_user( user_id="user_id", + about="about", + name="name", ) #### Signature @@ -2096,8 +2611,9 @@ client.update_user( def update_user( self, user_id: str, - about: typing.Optional[str] = OMIT, - name: typing.Optional[str] = OMIT, + about: str, + name: str, + metadata: typing.Optional[UpdateUserRequestMetadata] = OMIT, ) -> ResourceUpdatedResponse: ... ``` diff --git a/docs/python-sdk-docs/julep/api/core/jsonable_encoder.md b/docs/python-sdk-docs/julep/api/core/jsonable_encoder.md index 2f37b9c87..3bc44eeb9 100644 --- a/docs/python-sdk-docs/julep/api/core/jsonable_encoder.md +++ b/docs/python-sdk-docs/julep/api/core/jsonable_encoder.md @@ -16,7 +16,7 @@ ```python def generate_encoders_by_class_tuples( - type_encoder_map: Dict[Any, Callable[[Any], Any]] + type_encoder_map: Dict[Any, Callable[[Any], Any]], ) -> Dict[Callable[[Any], Any], Tuple[Any, ...]]: ... ``` diff --git a/docs/python-sdk-docs/julep/api/types/agent.md b/docs/python-sdk-docs/julep/api/types/agent.md index 7a27dc714..1c27ecb5c 100644 --- a/docs/python-sdk-docs/julep/api/types/agent.md +++ b/docs/python-sdk-docs/julep/api/types/agent.md @@ -19,7 +19,7 @@ class Agent(pydantic.BaseModel): ... ### Agent().dict -[Show source in agent.py:42](../../../../../../../julep/api/types/agent.py#L42) +[Show source in agent.py:45](../../../../../../../julep/api/types/agent.py#L45) #### Signature @@ -29,7 +29,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... ### Agent().json -[Show source in agent.py:34](../../../../../../../julep/api/types/agent.py#L34) +[Show source in agent.py:37](../../../../../../../julep/api/types/agent.py#L37) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/agent_metadata.md b/docs/python-sdk-docs/julep/api/types/agent_metadata.md new file mode 100644 index 000000000..1601c8f84 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/agent_metadata.md @@ -0,0 +1,40 @@ +# AgentMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / AgentMetadata + +> Auto-generated documentation for [julep.api.types.agent_metadata](../../../../../../../julep/api/types/agent_metadata.py) module. + +- [AgentMetadata](#agentmetadata) + - [AgentMetadata](#agentmetadata-1) + +## AgentMetadata + +[Show source in agent_metadata.py:14](../../../../../../../julep/api/types/agent_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class AgentMetadata(pydantic.BaseModel): ... +``` + +### AgentMetadata().dict + +[Show source in agent_metadata.py:27](../../../../../../../julep/api/types/agent_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### AgentMetadata().json + +[Show source in agent_metadata.py:19](../../../../../../../julep/api/types/agent_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/belief.md b/docs/python-sdk-docs/julep/api/types/belief.md deleted file mode 100644 index 0fc1e5ad4..000000000 --- a/docs/python-sdk-docs/julep/api/types/belief.md +++ /dev/null @@ -1,38 +0,0 @@ -# Belief - -[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / Belief - -> Auto-generated documentation for [julep.api.types.belief](../../../../../../../julep/api/types/belief.py) module. - -- [Belief](#belief) - - [Belief](#belief-1) - -## Belief - -[Show source in belief.py:16](../../../../../../../julep/api/types/belief.py#L16) - -#### Signature - -```python -class Belief(pydantic.BaseModel): ... -``` - -### Belief().dict - -[Show source in belief.py:44](../../../../../../../julep/api/types/belief.py#L44) - -#### Signature - -```python -def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... -``` - -### Belief().json - -[Show source in belief.py:36](../../../../../../../julep/api/types/belief.py#L36) - -#### Signature - -```python -def json(self, **kwargs: typing.Any) -> str: ... -``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/chat_settings.md b/docs/python-sdk-docs/julep/api/types/chat_settings.md index 2976c9e48..03c3f22ca 100644 --- a/docs/python-sdk-docs/julep/api/types/chat_settings.md +++ b/docs/python-sdk-docs/julep/api/types/chat_settings.md @@ -19,7 +19,7 @@ class ChatSettings(pydantic.BaseModel): ... ### ChatSettings().dict -[Show source in chat_settings.py:89](../../../../../../../julep/api/types/chat_settings.py#L89) +[Show source in chat_settings.py:99](../../../../../../../julep/api/types/chat_settings.py#L99) #### Signature @@ -29,7 +29,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... ### ChatSettings().json -[Show source in chat_settings.py:81](../../../../../../../julep/api/types/chat_settings.py#L81) +[Show source in chat_settings.py:91](../../../../../../../julep/api/types/chat_settings.py#L91) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/chat_settings_preset.md b/docs/python-sdk-docs/julep/api/types/chat_settings_preset.md index 9963cd1b8..0544a64d4 100644 --- a/docs/python-sdk-docs/julep/api/types/chat_settings_preset.md +++ b/docs/python-sdk-docs/julep/api/types/chat_settings_preset.md @@ -11,7 +11,7 @@ [Show source in chat_settings_preset.py:9](../../../../../../../julep/api/types/chat_settings_preset.py#L9) -Generation preset name (one of: problem_solving, conversational, fun, prose, creative, business, deterministic, code, multilingual) +Generation preset name (problem_solving|conversational|fun|prose|creative|business|deterministic|code|multilingual) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/create_agent_request_metadata.md b/docs/python-sdk-docs/julep/api/types/create_agent_request_metadata.md new file mode 100644 index 000000000..d6a53e97a --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/create_agent_request_metadata.md @@ -0,0 +1,40 @@ +# CreateAgentRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / CreateAgentRequestMetadata + +> Auto-generated documentation for [julep.api.types.create_agent_request_metadata](../../../../../../../julep/api/types/create_agent_request_metadata.py) module. + +- [CreateAgentRequestMetadata](#createagentrequestmetadata) + - [CreateAgentRequestMetadata](#createagentrequestmetadata-1) + +## CreateAgentRequestMetadata + +[Show source in create_agent_request_metadata.py:14](../../../../../../../julep/api/types/create_agent_request_metadata.py#L14) + +(Optional) metadata + +#### Signature + +```python +class CreateAgentRequestMetadata(pydantic.BaseModel): ... +``` + +### CreateAgentRequestMetadata().dict + +[Show source in create_agent_request_metadata.py:27](../../../../../../../julep/api/types/create_agent_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### CreateAgentRequestMetadata().json + +[Show source in create_agent_request_metadata.py:19](../../../../../../../julep/api/types/create_agent_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/create_doc.md b/docs/python-sdk-docs/julep/api/types/create_doc.md index 20367a868..151a6b0bb 100644 --- a/docs/python-sdk-docs/julep/api/types/create_doc.md +++ b/docs/python-sdk-docs/julep/api/types/create_doc.md @@ -9,7 +9,7 @@ ## CreateDoc -[Show source in create_doc.py:14](../../../../../../../julep/api/types/create_doc.py#L14) +[Show source in create_doc.py:15](../../../../../../../julep/api/types/create_doc.py#L15) #### Signature @@ -19,7 +19,7 @@ class CreateDoc(pydantic.BaseModel): ... ### CreateDoc().dict -[Show source in create_doc.py:28](../../../../../../../julep/api/types/create_doc.py#L28) +[Show source in create_doc.py:32](../../../../../../../julep/api/types/create_doc.py#L32) #### Signature @@ -29,7 +29,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... ### CreateDoc().json -[Show source in create_doc.py:20](../../../../../../../julep/api/types/create_doc.py#L20) +[Show source in create_doc.py:24](../../../../../../../julep/api/types/create_doc.py#L24) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/create_doc_metadata.md b/docs/python-sdk-docs/julep/api/types/create_doc_metadata.md new file mode 100644 index 000000000..0d94b4047 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/create_doc_metadata.md @@ -0,0 +1,40 @@ +# CreateDocMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / CreateDocMetadata + +> Auto-generated documentation for [julep.api.types.create_doc_metadata](../../../../../../../julep/api/types/create_doc_metadata.py) module. + +- [CreateDocMetadata](#createdocmetadata) + - [CreateDocMetadata](#createdocmetadata-1) + +## CreateDocMetadata + +[Show source in create_doc_metadata.py:14](../../../../../../../julep/api/types/create_doc_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class CreateDocMetadata(pydantic.BaseModel): ... +``` + +### CreateDocMetadata().dict + +[Show source in create_doc_metadata.py:27](../../../../../../../julep/api/types/create_doc_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### CreateDocMetadata().json + +[Show source in create_doc_metadata.py:19](../../../../../../../julep/api/types/create_doc_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/create_session_request_metadata.md b/docs/python-sdk-docs/julep/api/types/create_session_request_metadata.md new file mode 100644 index 000000000..598370906 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/create_session_request_metadata.md @@ -0,0 +1,40 @@ +# CreateSessionRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / CreateSessionRequestMetadata + +> Auto-generated documentation for [julep.api.types.create_session_request_metadata](../../../../../../../julep/api/types/create_session_request_metadata.py) module. + +- [CreateSessionRequestMetadata](#createsessionrequestmetadata) + - [CreateSessionRequestMetadata](#createsessionrequestmetadata-1) + +## CreateSessionRequestMetadata + +[Show source in create_session_request_metadata.py:14](../../../../../../../julep/api/types/create_session_request_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class CreateSessionRequestMetadata(pydantic.BaseModel): ... +``` + +### CreateSessionRequestMetadata().dict + +[Show source in create_session_request_metadata.py:27](../../../../../../../julep/api/types/create_session_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### CreateSessionRequestMetadata().json + +[Show source in create_session_request_metadata.py:19](../../../../../../../julep/api/types/create_session_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/create_user_request_metadata.md b/docs/python-sdk-docs/julep/api/types/create_user_request_metadata.md new file mode 100644 index 000000000..97b7604a3 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/create_user_request_metadata.md @@ -0,0 +1,40 @@ +# CreateUserRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / CreateUserRequestMetadata + +> Auto-generated documentation for [julep.api.types.create_user_request_metadata](../../../../../../../julep/api/types/create_user_request_metadata.py) module. + +- [CreateUserRequestMetadata](#createuserrequestmetadata) + - [CreateUserRequestMetadata](#createuserrequestmetadata-1) + +## CreateUserRequestMetadata + +[Show source in create_user_request_metadata.py:14](../../../../../../../julep/api/types/create_user_request_metadata.py#L14) + +(Optional) metadata + +#### Signature + +```python +class CreateUserRequestMetadata(pydantic.BaseModel): ... +``` + +### CreateUserRequestMetadata().dict + +[Show source in create_user_request_metadata.py:27](../../../../../../../julep/api/types/create_user_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### CreateUserRequestMetadata().json + +[Show source in create_user_request_metadata.py:19](../../../../../../../julep/api/types/create_user_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/doc.md b/docs/python-sdk-docs/julep/api/types/doc.md index 5de8003a8..e22a672f6 100644 --- a/docs/python-sdk-docs/julep/api/types/doc.md +++ b/docs/python-sdk-docs/julep/api/types/doc.md @@ -9,7 +9,7 @@ ## Doc -[Show source in doc.py:14](../../../../../../../julep/api/types/doc.py#L14) +[Show source in doc.py:15](../../../../../../../julep/api/types/doc.py#L15) #### Signature @@ -19,7 +19,7 @@ class Doc(pydantic.BaseModel): ... ### Doc().dict -[Show source in doc.py:30](../../../../../../../julep/api/types/doc.py#L30) +[Show source in doc.py:34](../../../../../../../julep/api/types/doc.py#L34) #### Signature @@ -29,7 +29,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... ### Doc().json -[Show source in doc.py:22](../../../../../../../julep/api/types/doc.py#L22) +[Show source in doc.py:26](../../../../../../../julep/api/types/doc.py#L26) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/doc_metadata.md b/docs/python-sdk-docs/julep/api/types/doc_metadata.md new file mode 100644 index 000000000..946f99236 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/doc_metadata.md @@ -0,0 +1,40 @@ +# DocMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / DocMetadata + +> Auto-generated documentation for [julep.api.types.doc_metadata](../../../../../../../julep/api/types/doc_metadata.py) module. + +- [DocMetadata](#docmetadata) + - [DocMetadata](#docmetadata-1) + +## DocMetadata + +[Show source in doc_metadata.py:14](../../../../../../../julep/api/types/doc_metadata.py#L14) + +optional metadata + +#### Signature + +```python +class DocMetadata(pydantic.BaseModel): ... +``` + +### DocMetadata().dict + +[Show source in doc_metadata.py:27](../../../../../../../julep/api/types/doc_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### DocMetadata().json + +[Show source in doc_metadata.py:19](../../../../../../../julep/api/types/doc_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/entity.md b/docs/python-sdk-docs/julep/api/types/entity.md deleted file mode 100644 index ca6067654..000000000 --- a/docs/python-sdk-docs/julep/api/types/entity.md +++ /dev/null @@ -1,40 +0,0 @@ -# Entity - -[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / Entity - -> Auto-generated documentation for [julep.api.types.entity](../../../../../../../julep/api/types/entity.py) module. - -- [Entity](#entity) - - [Entity](#entity-1) - -## Entity - -[Show source in entity.py:14](../../../../../../../julep/api/types/entity.py#L14) - -TBD - -#### Signature - -```python -class Entity(pydantic.BaseModel): ... -``` - -### Entity().dict - -[Show source in entity.py:29](../../../../../../../julep/api/types/entity.py#L29) - -#### Signature - -```python -def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... -``` - -### Entity().json - -[Show source in entity.py:21](../../../../../../../julep/api/types/entity.py#L21) - -#### Signature - -```python -def json(self, **kwargs: typing.Any) -> str: ... -``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/episode.md b/docs/python-sdk-docs/julep/api/types/episode.md deleted file mode 100644 index 6e30d3ae2..000000000 --- a/docs/python-sdk-docs/julep/api/types/episode.md +++ /dev/null @@ -1,38 +0,0 @@ -# Episode - -[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / Episode - -> Auto-generated documentation for [julep.api.types.episode](../../../../../../../julep/api/types/episode.py) module. - -- [Episode](#episode) - - [Episode](#episode-1) - -## Episode - -[Show source in episode.py:16](../../../../../../../julep/api/types/episode.py#L16) - -#### Signature - -```python -class Episode(pydantic.BaseModel): ... -``` - -### Episode().dict - -[Show source in episode.py:47](../../../../../../../julep/api/types/episode.py#L47) - -#### Signature - -```python -def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... -``` - -### Episode().json - -[Show source in episode.py:39](../../../../../../../julep/api/types/episode.py#L39) - -#### Signature - -```python -def json(self, **kwargs: typing.Any) -> str: ... -``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/get_agent_docs_request_order.md b/docs/python-sdk-docs/julep/api/types/get_agent_docs_request_order.md new file mode 100644 index 000000000..77dd0db21 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/get_agent_docs_request_order.md @@ -0,0 +1,34 @@ +# GetAgentDocsRequestOrder + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / GetAgentDocsRequestOrder + +> Auto-generated documentation for [julep.api.types.get_agent_docs_request_order](../../../../../../../julep/api/types/get_agent_docs_request_order.py) module. + +- [GetAgentDocsRequestOrder](#getagentdocsrequestorder) + - [GetAgentDocsRequestOrder](#getagentdocsrequestorder-1) + +## GetAgentDocsRequestOrder + +[Show source in get_agent_docs_request_order.py:9](../../../../../../../julep/api/types/get_agent_docs_request_order.py#L9) + +#### Signature + +```python +class GetAgentDocsRequestOrder(str, enum.Enum): ... +``` + +### GetAgentDocsRequestOrder().visit + +[Show source in get_agent_docs_request_order.py:13](../../../../../../../julep/api/types/get_agent_docs_request_order.py#L13) + +#### Signature + +```python +def visit( + self, asc: typing.Callable[[], T_Result], desc: typing.Callable[[], T_Result] +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/get_agent_docs_request_sort_by.md b/docs/python-sdk-docs/julep/api/types/get_agent_docs_request_sort_by.md new file mode 100644 index 000000000..d2759f470 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/get_agent_docs_request_sort_by.md @@ -0,0 +1,36 @@ +# GetAgentDocsRequestSortBy + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / GetAgentDocsRequestSortBy + +> Auto-generated documentation for [julep.api.types.get_agent_docs_request_sort_by](../../../../../../../julep/api/types/get_agent_docs_request_sort_by.py) module. + +- [GetAgentDocsRequestSortBy](#getagentdocsrequestsortby) + - [GetAgentDocsRequestSortBy](#getagentdocsrequestsortby-1) + +## GetAgentDocsRequestSortBy + +[Show source in get_agent_docs_request_sort_by.py:9](../../../../../../../julep/api/types/get_agent_docs_request_sort_by.py#L9) + +#### Signature + +```python +class GetAgentDocsRequestSortBy(str, enum.Enum): ... +``` + +### GetAgentDocsRequestSortBy().visit + +[Show source in get_agent_docs_request_sort_by.py:13](../../../../../../../julep/api/types/get_agent_docs_request_sort_by.py#L13) + +#### Signature + +```python +def visit( + self, + created_at: typing.Callable[[], T_Result], + updated_at: typing.Callable[[], T_Result], +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/get_user_docs_request_order.md b/docs/python-sdk-docs/julep/api/types/get_user_docs_request_order.md new file mode 100644 index 000000000..84111d56e --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/get_user_docs_request_order.md @@ -0,0 +1,34 @@ +# GetUserDocsRequestOrder + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / GetUserDocsRequestOrder + +> Auto-generated documentation for [julep.api.types.get_user_docs_request_order](../../../../../../../julep/api/types/get_user_docs_request_order.py) module. + +- [GetUserDocsRequestOrder](#getuserdocsrequestorder) + - [GetUserDocsRequestOrder](#getuserdocsrequestorder-1) + +## GetUserDocsRequestOrder + +[Show source in get_user_docs_request_order.py:9](../../../../../../../julep/api/types/get_user_docs_request_order.py#L9) + +#### Signature + +```python +class GetUserDocsRequestOrder(str, enum.Enum): ... +``` + +### GetUserDocsRequestOrder().visit + +[Show source in get_user_docs_request_order.py:13](../../../../../../../julep/api/types/get_user_docs_request_order.py#L13) + +#### Signature + +```python +def visit( + self, asc: typing.Callable[[], T_Result], desc: typing.Callable[[], T_Result] +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/get_user_docs_request_sort_by.md b/docs/python-sdk-docs/julep/api/types/get_user_docs_request_sort_by.md new file mode 100644 index 000000000..644860390 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/get_user_docs_request_sort_by.md @@ -0,0 +1,36 @@ +# GetUserDocsRequestSortBy + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / GetUserDocsRequestSortBy + +> Auto-generated documentation for [julep.api.types.get_user_docs_request_sort_by](../../../../../../../julep/api/types/get_user_docs_request_sort_by.py) module. + +- [GetUserDocsRequestSortBy](#getuserdocsrequestsortby) + - [GetUserDocsRequestSortBy](#getuserdocsrequestsortby-1) + +## GetUserDocsRequestSortBy + +[Show source in get_user_docs_request_sort_by.py:9](../../../../../../../julep/api/types/get_user_docs_request_sort_by.py#L9) + +#### Signature + +```python +class GetUserDocsRequestSortBy(str, enum.Enum): ... +``` + +### GetUserDocsRequestSortBy().visit + +[Show source in get_user_docs_request_sort_by.py:13](../../../../../../../julep/api/types/get_user_docs_request_sort_by.py#L13) + +#### Signature + +```python +def visit( + self, + created_at: typing.Callable[[], T_Result], + updated_at: typing.Callable[[], T_Result], +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/index.md b/docs/python-sdk-docs/julep/api/types/index.md index 5126de2a8..ec990539f 100644 --- a/docs/python-sdk-docs/julep/api/types/index.md +++ b/docs/python-sdk-docs/julep/api/types/index.md @@ -12,7 +12,7 @@ - [Agent](./agent.md) - [AgentDefaultSettings](./agent_default_settings.md) - [AgentDefaultSettingsPreset](./agent_default_settings_preset.md) -- [Belief](./belief.md) +- [AgentMetadata](./agent_metadata.md) - [ChatInputData](./chat_input_data.md) - [Chat Input Data Tool Choice](./chat_input_data_tool_choice.md) - [ChatMlMessage](./chat_ml_message.md) @@ -26,40 +26,62 @@ - [ChatSettingsResponseFormatType](./chat_settings_response_format_type.md) - [Chat Settings Stop](./chat_settings_stop.md) - [CompletionUsage](./completion_usage.md) +- [CreateAgentRequestMetadata](./create_agent_request_metadata.md) - [CreateDoc](./create_doc.md) +- [CreateDocMetadata](./create_doc_metadata.md) +- [CreateSessionRequestMetadata](./create_session_request_metadata.md) - [CreateToolRequest](./create_tool_request.md) - [CreateToolRequestType](./create_tool_request_type.md) +- [CreateUserRequestMetadata](./create_user_request_metadata.md) - [Doc](./doc.md) -- [Entity](./entity.md) -- [Episode](./episode.md) +- [DocMetadata](./doc_metadata.md) - [FunctionCallOption](./function_call_option.md) - [FunctionDef](./function_def.md) - [Function Parameters](./function_parameters.md) +- [GetAgentDocsRequestOrder](./get_agent_docs_request_order.md) +- [GetAgentDocsRequestSortBy](./get_agent_docs_request_sort_by.md) - [GetAgentDocsResponse](./get_agent_docs_response.md) - [GetAgentMemoriesResponse](./get_agent_memories_response.md) - [GetAgentToolsResponse](./get_agent_tools_response.md) - [GetHistoryResponse](./get_history_response.md) - [GetSuggestionsResponse](./get_suggestions_response.md) +- [GetUserDocsRequestOrder](./get_user_docs_request_order.md) +- [GetUserDocsRequestSortBy](./get_user_docs_request_sort_by.md) - [GetUserDocsResponse](./get_user_docs_response.md) - [InputChatMlMessage](./input_chat_ml_message.md) - [InputChatMlMessageRole](./input_chat_ml_message_role.md) -- [Instruction](./instruction.md) - [JobStatus](./job_status.md) - [JobStatusState](./job_status_state.md) +- [ListAgentsRequestOrder](./list_agents_request_order.md) +- [ListAgentsRequestSortBy](./list_agents_request_sort_by.md) - [ListAgentsResponse](./list_agents_response.md) +- [ListSessionsRequestOrder](./list_sessions_request_order.md) +- [ListSessionsRequestSortBy](./list_sessions_request_sort_by.md) - [ListSessionsResponse](./list_sessions_response.md) +- [ListUsersRequestOrder](./list_users_request_order.md) +- [ListUsersRequestSortBy](./list_users_request_sort_by.md) - [ListUsersResponse](./list_users_response.md) - [Memory](./memory.md) - [MemoryAccessOptions](./memory_access_options.md) +- [MemoryEntitiesItem](./memory_entities_item.md) - [NamedToolChoice](./named_tool_choice.md) - [NamedToolChoiceFunction](./named_tool_choice_function.md) +- [PartialFunctionDef](./partial_function_def.md) +- [PatchAgentRequestMetadata](./patch_agent_request_metadata.md) +- [PatchSessionRequestMetadata](./patch_session_request_metadata.md) +- [PatchUserRequestMetadata](./patch_user_request_metadata.md) - [ResourceCreatedResponse](./resource_created_response.md) - [ResourceDeletedResponse](./resource_deleted_response.md) - [ResourceUpdatedResponse](./resource_updated_response.md) - [Session](./session.md) +- [SessionMetadata](./session_metadata.md) - [Suggestion](./suggestion.md) - [SuggestionTarget](./suggestion_target.md) - [Tool](./tool.md) - [Tool Choice Option](./tool_choice_option.md) - [ToolType](./tool_type.md) -- [User](./user.md) \ No newline at end of file +- [UpdateAgentRequestMetadata](./update_agent_request_metadata.md) +- [UpdateSessionRequestMetadata](./update_session_request_metadata.md) +- [UpdateUserRequestMetadata](./update_user_request_metadata.md) +- [User](./user.md) +- [UserMetadata](./user_metadata.md) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/input_chat_ml_message_role.md b/docs/python-sdk-docs/julep/api/types/input_chat_ml_message_role.md index f8bb6694f..38357c3a8 100644 --- a/docs/python-sdk-docs/julep/api/types/input_chat_ml_message_role.md +++ b/docs/python-sdk-docs/julep/api/types/input_chat_ml_message_role.md @@ -21,7 +21,7 @@ class InputChatMlMessageRole(str, enum.Enum): ... ### InputChatMlMessageRole().visit -[Show source in input_chat_ml_message_role.py:19](../../../../../../../julep/api/types/input_chat_ml_message_role.py#L19) +[Show source in input_chat_ml_message_role.py:20](../../../../../../../julep/api/types/input_chat_ml_message_role.py#L20) #### Signature @@ -32,6 +32,7 @@ def visit( assistant: typing.Callable[[], T_Result], system: typing.Callable[[], T_Result], function_call: typing.Callable[[], T_Result], + auto: typing.Callable[[], T_Result], ) -> T_Result: ... ``` diff --git a/docs/python-sdk-docs/julep/api/types/instruction.md b/docs/python-sdk-docs/julep/api/types/instruction.md deleted file mode 100644 index 3af8b90aa..000000000 --- a/docs/python-sdk-docs/julep/api/types/instruction.md +++ /dev/null @@ -1,38 +0,0 @@ -# Instruction - -[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / Instruction - -> Auto-generated documentation for [julep.api.types.instruction](../../../../../../../julep/api/types/instruction.py) module. - -- [Instruction](#instruction) - - [Instruction](#instruction-1) - -## Instruction - -[Show source in instruction.py:14](../../../../../../../julep/api/types/instruction.py#L14) - -#### Signature - -```python -class Instruction(pydantic.BaseModel): ... -``` - -### Instruction().dict - -[Show source in instruction.py:28](../../../../../../../julep/api/types/instruction.py#L28) - -#### Signature - -```python -def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... -``` - -### Instruction().json - -[Show source in instruction.py:20](../../../../../../../julep/api/types/instruction.py#L20) - -#### Signature - -```python -def json(self, **kwargs: typing.Any) -> str: ... -``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/list_agents_request_order.md b/docs/python-sdk-docs/julep/api/types/list_agents_request_order.md new file mode 100644 index 000000000..6812e0e41 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/list_agents_request_order.md @@ -0,0 +1,34 @@ +# ListAgentsRequestOrder + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / ListAgentsRequestOrder + +> Auto-generated documentation for [julep.api.types.list_agents_request_order](../../../../../../../julep/api/types/list_agents_request_order.py) module. + +- [ListAgentsRequestOrder](#listagentsrequestorder) + - [ListAgentsRequestOrder](#listagentsrequestorder-1) + +## ListAgentsRequestOrder + +[Show source in list_agents_request_order.py:9](../../../../../../../julep/api/types/list_agents_request_order.py#L9) + +#### Signature + +```python +class ListAgentsRequestOrder(str, enum.Enum): ... +``` + +### ListAgentsRequestOrder().visit + +[Show source in list_agents_request_order.py:13](../../../../../../../julep/api/types/list_agents_request_order.py#L13) + +#### Signature + +```python +def visit( + self, asc: typing.Callable[[], T_Result], desc: typing.Callable[[], T_Result] +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/list_agents_request_sort_by.md b/docs/python-sdk-docs/julep/api/types/list_agents_request_sort_by.md new file mode 100644 index 000000000..e5480f03c --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/list_agents_request_sort_by.md @@ -0,0 +1,36 @@ +# ListAgentsRequestSortBy + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / ListAgentsRequestSortBy + +> Auto-generated documentation for [julep.api.types.list_agents_request_sort_by](../../../../../../../julep/api/types/list_agents_request_sort_by.py) module. + +- [ListAgentsRequestSortBy](#listagentsrequestsortby) + - [ListAgentsRequestSortBy](#listagentsrequestsortby-1) + +## ListAgentsRequestSortBy + +[Show source in list_agents_request_sort_by.py:9](../../../../../../../julep/api/types/list_agents_request_sort_by.py#L9) + +#### Signature + +```python +class ListAgentsRequestSortBy(str, enum.Enum): ... +``` + +### ListAgentsRequestSortBy().visit + +[Show source in list_agents_request_sort_by.py:13](../../../../../../../julep/api/types/list_agents_request_sort_by.py#L13) + +#### Signature + +```python +def visit( + self, + created_at: typing.Callable[[], T_Result], + updated_at: typing.Callable[[], T_Result], +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/list_sessions_request_order.md b/docs/python-sdk-docs/julep/api/types/list_sessions_request_order.md new file mode 100644 index 000000000..835df51b2 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/list_sessions_request_order.md @@ -0,0 +1,34 @@ +# ListSessionsRequestOrder + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / ListSessionsRequestOrder + +> Auto-generated documentation for [julep.api.types.list_sessions_request_order](../../../../../../../julep/api/types/list_sessions_request_order.py) module. + +- [ListSessionsRequestOrder](#listsessionsrequestorder) + - [ListSessionsRequestOrder](#listsessionsrequestorder-1) + +## ListSessionsRequestOrder + +[Show source in list_sessions_request_order.py:9](../../../../../../../julep/api/types/list_sessions_request_order.py#L9) + +#### Signature + +```python +class ListSessionsRequestOrder(str, enum.Enum): ... +``` + +### ListSessionsRequestOrder().visit + +[Show source in list_sessions_request_order.py:13](../../../../../../../julep/api/types/list_sessions_request_order.py#L13) + +#### Signature + +```python +def visit( + self, asc: typing.Callable[[], T_Result], desc: typing.Callable[[], T_Result] +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/list_sessions_request_sort_by.md b/docs/python-sdk-docs/julep/api/types/list_sessions_request_sort_by.md new file mode 100644 index 000000000..cd604479b --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/list_sessions_request_sort_by.md @@ -0,0 +1,36 @@ +# ListSessionsRequestSortBy + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / ListSessionsRequestSortBy + +> Auto-generated documentation for [julep.api.types.list_sessions_request_sort_by](../../../../../../../julep/api/types/list_sessions_request_sort_by.py) module. + +- [ListSessionsRequestSortBy](#listsessionsrequestsortby) + - [ListSessionsRequestSortBy](#listsessionsrequestsortby-1) + +## ListSessionsRequestSortBy + +[Show source in list_sessions_request_sort_by.py:9](../../../../../../../julep/api/types/list_sessions_request_sort_by.py#L9) + +#### Signature + +```python +class ListSessionsRequestSortBy(str, enum.Enum): ... +``` + +### ListSessionsRequestSortBy().visit + +[Show source in list_sessions_request_sort_by.py:13](../../../../../../../julep/api/types/list_sessions_request_sort_by.py#L13) + +#### Signature + +```python +def visit( + self, + created_at: typing.Callable[[], T_Result], + updated_at: typing.Callable[[], T_Result], +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/list_users_request_order.md b/docs/python-sdk-docs/julep/api/types/list_users_request_order.md new file mode 100644 index 000000000..3b0b4ccf4 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/list_users_request_order.md @@ -0,0 +1,34 @@ +# ListUsersRequestOrder + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / ListUsersRequestOrder + +> Auto-generated documentation for [julep.api.types.list_users_request_order](../../../../../../../julep/api/types/list_users_request_order.py) module. + +- [ListUsersRequestOrder](#listusersrequestorder) + - [ListUsersRequestOrder](#listusersrequestorder-1) + +## ListUsersRequestOrder + +[Show source in list_users_request_order.py:9](../../../../../../../julep/api/types/list_users_request_order.py#L9) + +#### Signature + +```python +class ListUsersRequestOrder(str, enum.Enum): ... +``` + +### ListUsersRequestOrder().visit + +[Show source in list_users_request_order.py:13](../../../../../../../julep/api/types/list_users_request_order.py#L13) + +#### Signature + +```python +def visit( + self, asc: typing.Callable[[], T_Result], desc: typing.Callable[[], T_Result] +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/list_users_request_sort_by.md b/docs/python-sdk-docs/julep/api/types/list_users_request_sort_by.md new file mode 100644 index 000000000..608db34b3 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/list_users_request_sort_by.md @@ -0,0 +1,36 @@ +# ListUsersRequestSortBy + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / ListUsersRequestSortBy + +> Auto-generated documentation for [julep.api.types.list_users_request_sort_by](../../../../../../../julep/api/types/list_users_request_sort_by.py) module. + +- [ListUsersRequestSortBy](#listusersrequestsortby) + - [ListUsersRequestSortBy](#listusersrequestsortby-1) + +## ListUsersRequestSortBy + +[Show source in list_users_request_sort_by.py:9](../../../../../../../julep/api/types/list_users_request_sort_by.py#L9) + +#### Signature + +```python +class ListUsersRequestSortBy(str, enum.Enum): ... +``` + +### ListUsersRequestSortBy().visit + +[Show source in list_users_request_sort_by.py:13](../../../../../../../julep/api/types/list_users_request_sort_by.py#L13) + +#### Signature + +```python +def visit( + self, + created_at: typing.Callable[[], T_Result], + updated_at: typing.Callable[[], T_Result], +) -> T_Result: ... +``` + +#### See also + +- [T_Result](#t_result) \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/memory.md b/docs/python-sdk-docs/julep/api/types/memory.md index a153e67ff..3b733fcad 100644 --- a/docs/python-sdk-docs/julep/api/types/memory.md +++ b/docs/python-sdk-docs/julep/api/types/memory.md @@ -3,4 +3,36 @@ [Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / Memory > Auto-generated documentation for [julep.api.types.memory](../../../../../../../julep/api/types/memory.py) module. + - [Memory](#memory) + - [Memory](#memory-1) + +## Memory + +[Show source in memory.py:15](../../../../../../../julep/api/types/memory.py#L15) + +#### Signature + +```python +class Memory(pydantic.BaseModel): ... +``` + +### Memory().dict + +[Show source in memory.py:44](../../../../../../../julep/api/types/memory.py#L44) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### Memory().json + +[Show source in memory.py:36](../../../../../../../julep/api/types/memory.py#L36) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/memory_access_options.md b/docs/python-sdk-docs/julep/api/types/memory_access_options.md index 757752e1a..05c494de6 100644 --- a/docs/python-sdk-docs/julep/api/types/memory_access_options.md +++ b/docs/python-sdk-docs/julep/api/types/memory_access_options.md @@ -19,7 +19,7 @@ class MemoryAccessOptions(pydantic.BaseModel): ... ### MemoryAccessOptions().dict -[Show source in memory_access_options.py:30](../../../../../../../julep/api/types/memory_access_options.py#L30) +[Show source in memory_access_options.py:33](../../../../../../../julep/api/types/memory_access_options.py#L33) #### Signature @@ -29,7 +29,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... ### MemoryAccessOptions().json -[Show source in memory_access_options.py:22](../../../../../../../julep/api/types/memory_access_options.py#L22) +[Show source in memory_access_options.py:25](../../../../../../../julep/api/types/memory_access_options.py#L25) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/memory_entities_item.md b/docs/python-sdk-docs/julep/api/types/memory_entities_item.md new file mode 100644 index 000000000..cf1078fff --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/memory_entities_item.md @@ -0,0 +1,38 @@ +# MemoryEntitiesItem + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / MemoryEntitiesItem + +> Auto-generated documentation for [julep.api.types.memory_entities_item](../../../../../../../julep/api/types/memory_entities_item.py) module. + +- [MemoryEntitiesItem](#memoryentitiesitem) + - [MemoryEntitiesItem](#memoryentitiesitem-1) + +## MemoryEntitiesItem + +[Show source in memory_entities_item.py:14](../../../../../../../julep/api/types/memory_entities_item.py#L14) + +#### Signature + +```python +class MemoryEntitiesItem(pydantic.BaseModel): ... +``` + +### MemoryEntitiesItem().dict + +[Show source in memory_entities_item.py:23](../../../../../../../julep/api/types/memory_entities_item.py#L23) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### MemoryEntitiesItem().json + +[Show source in memory_entities_item.py:15](../../../../../../../julep/api/types/memory_entities_item.py#L15) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/partial_function_def.md b/docs/python-sdk-docs/julep/api/types/partial_function_def.md new file mode 100644 index 000000000..de4bd6570 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/partial_function_def.md @@ -0,0 +1,38 @@ +# PartialFunctionDef + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / PartialFunctionDef + +> Auto-generated documentation for [julep.api.types.partial_function_def](../../../../../../../julep/api/types/partial_function_def.py) module. + +- [PartialFunctionDef](#partialfunctiondef) + - [PartialFunctionDef](#partialfunctiondef-1) + +## PartialFunctionDef + +[Show source in partial_function_def.py:15](../../../../../../../julep/api/types/partial_function_def.py#L15) + +#### Signature + +```python +class PartialFunctionDef(pydantic.BaseModel): ... +``` + +### PartialFunctionDef().dict + +[Show source in partial_function_def.py:34](../../../../../../../julep/api/types/partial_function_def.py#L34) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### PartialFunctionDef().json + +[Show source in partial_function_def.py:26](../../../../../../../julep/api/types/partial_function_def.py#L26) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/patch_agent_request_metadata.md b/docs/python-sdk-docs/julep/api/types/patch_agent_request_metadata.md new file mode 100644 index 000000000..7447c5f4b --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/patch_agent_request_metadata.md @@ -0,0 +1,40 @@ +# PatchAgentRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / PatchAgentRequestMetadata + +> Auto-generated documentation for [julep.api.types.patch_agent_request_metadata](../../../../../../../julep/api/types/patch_agent_request_metadata.py) module. + +- [PatchAgentRequestMetadata](#patchagentrequestmetadata) + - [PatchAgentRequestMetadata](#patchagentrequestmetadata-1) + +## PatchAgentRequestMetadata + +[Show source in patch_agent_request_metadata.py:14](../../../../../../../julep/api/types/patch_agent_request_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class PatchAgentRequestMetadata(pydantic.BaseModel): ... +``` + +### PatchAgentRequestMetadata().dict + +[Show source in patch_agent_request_metadata.py:27](../../../../../../../julep/api/types/patch_agent_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### PatchAgentRequestMetadata().json + +[Show source in patch_agent_request_metadata.py:19](../../../../../../../julep/api/types/patch_agent_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/patch_session_request_metadata.md b/docs/python-sdk-docs/julep/api/types/patch_session_request_metadata.md new file mode 100644 index 000000000..c2de5ff95 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/patch_session_request_metadata.md @@ -0,0 +1,40 @@ +# PatchSessionRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / PatchSessionRequestMetadata + +> Auto-generated documentation for [julep.api.types.patch_session_request_metadata](../../../../../../../julep/api/types/patch_session_request_metadata.py) module. + +- [PatchSessionRequestMetadata](#patchsessionrequestmetadata) + - [PatchSessionRequestMetadata](#patchsessionrequestmetadata-1) + +## PatchSessionRequestMetadata + +[Show source in patch_session_request_metadata.py:14](../../../../../../../julep/api/types/patch_session_request_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class PatchSessionRequestMetadata(pydantic.BaseModel): ... +``` + +### PatchSessionRequestMetadata().dict + +[Show source in patch_session_request_metadata.py:27](../../../../../../../julep/api/types/patch_session_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### PatchSessionRequestMetadata().json + +[Show source in patch_session_request_metadata.py:19](../../../../../../../julep/api/types/patch_session_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/patch_user_request_metadata.md b/docs/python-sdk-docs/julep/api/types/patch_user_request_metadata.md new file mode 100644 index 000000000..ec28de7cb --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/patch_user_request_metadata.md @@ -0,0 +1,40 @@ +# PatchUserRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / PatchUserRequestMetadata + +> Auto-generated documentation for [julep.api.types.patch_user_request_metadata](../../../../../../../julep/api/types/patch_user_request_metadata.py) module. + +- [PatchUserRequestMetadata](#patchuserrequestmetadata) + - [PatchUserRequestMetadata](#patchuserrequestmetadata-1) + +## PatchUserRequestMetadata + +[Show source in patch_user_request_metadata.py:14](../../../../../../../julep/api/types/patch_user_request_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class PatchUserRequestMetadata(pydantic.BaseModel): ... +``` + +### PatchUserRequestMetadata().dict + +[Show source in patch_user_request_metadata.py:27](../../../../../../../julep/api/types/patch_user_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### PatchUserRequestMetadata().json + +[Show source in patch_user_request_metadata.py:19](../../../../../../../julep/api/types/patch_user_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/resource_deleted_response.md b/docs/python-sdk-docs/julep/api/types/resource_deleted_response.md index 543f99cb9..621a46146 100644 --- a/docs/python-sdk-docs/julep/api/types/resource_deleted_response.md +++ b/docs/python-sdk-docs/julep/api/types/resource_deleted_response.md @@ -19,7 +19,7 @@ class ResourceDeletedResponse(pydantic.BaseModel): ... ### ResourceDeletedResponse().dict -[Show source in resource_deleted_response.py:26](../../../../../../../julep/api/types/resource_deleted_response.py#L26) +[Show source in resource_deleted_response.py:29](../../../../../../../julep/api/types/resource_deleted_response.py#L29) #### Signature @@ -29,7 +29,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... ### ResourceDeletedResponse().json -[Show source in resource_deleted_response.py:18](../../../../../../../julep/api/types/resource_deleted_response.py#L18) +[Show source in resource_deleted_response.py:21](../../../../../../../julep/api/types/resource_deleted_response.py#L21) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/session.md b/docs/python-sdk-docs/julep/api/types/session.md index 6dd2855f5..140770e84 100644 --- a/docs/python-sdk-docs/julep/api/types/session.md +++ b/docs/python-sdk-docs/julep/api/types/session.md @@ -9,7 +9,7 @@ ## Session -[Show source in session.py:14](../../../../../../../julep/api/types/session.py#L14) +[Show source in session.py:15](../../../../../../../julep/api/types/session.py#L15) #### Signature @@ -19,7 +19,7 @@ class Session(pydantic.BaseModel): ... ### Session().dict -[Show source in session.py:43](../../../../../../../julep/api/types/session.py#L43) +[Show source in session.py:47](../../../../../../../julep/api/types/session.py#L47) #### Signature @@ -29,7 +29,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... ### Session().json -[Show source in session.py:35](../../../../../../../julep/api/types/session.py#L35) +[Show source in session.py:39](../../../../../../../julep/api/types/session.py#L39) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/session_metadata.md b/docs/python-sdk-docs/julep/api/types/session_metadata.md new file mode 100644 index 000000000..092185a4b --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/session_metadata.md @@ -0,0 +1,40 @@ +# SessionMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / SessionMetadata + +> Auto-generated documentation for [julep.api.types.session_metadata](../../../../../../../julep/api/types/session_metadata.py) module. + +- [SessionMetadata](#sessionmetadata) + - [SessionMetadata](#sessionmetadata-1) + +## SessionMetadata + +[Show source in session_metadata.py:14](../../../../../../../julep/api/types/session_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class SessionMetadata(pydantic.BaseModel): ... +``` + +### SessionMetadata().dict + +[Show source in session_metadata.py:27](../../../../../../../julep/api/types/session_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### SessionMetadata().json + +[Show source in session_metadata.py:19](../../../../../../../julep/api/types/session_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/update_agent_request_metadata.md b/docs/python-sdk-docs/julep/api/types/update_agent_request_metadata.md new file mode 100644 index 000000000..5809b47c2 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/update_agent_request_metadata.md @@ -0,0 +1,40 @@ +# UpdateAgentRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / UpdateAgentRequestMetadata + +> Auto-generated documentation for [julep.api.types.update_agent_request_metadata](../../../../../../../julep/api/types/update_agent_request_metadata.py) module. + +- [UpdateAgentRequestMetadata](#updateagentrequestmetadata) + - [UpdateAgentRequestMetadata](#updateagentrequestmetadata-1) + +## UpdateAgentRequestMetadata + +[Show source in update_agent_request_metadata.py:14](../../../../../../../julep/api/types/update_agent_request_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class UpdateAgentRequestMetadata(pydantic.BaseModel): ... +``` + +### UpdateAgentRequestMetadata().dict + +[Show source in update_agent_request_metadata.py:27](../../../../../../../julep/api/types/update_agent_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### UpdateAgentRequestMetadata().json + +[Show source in update_agent_request_metadata.py:19](../../../../../../../julep/api/types/update_agent_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/update_session_request_metadata.md b/docs/python-sdk-docs/julep/api/types/update_session_request_metadata.md new file mode 100644 index 000000000..f5f77ce1c --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/update_session_request_metadata.md @@ -0,0 +1,40 @@ +# UpdateSessionRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / UpdateSessionRequestMetadata + +> Auto-generated documentation for [julep.api.types.update_session_request_metadata](../../../../../../../julep/api/types/update_session_request_metadata.py) module. + +- [UpdateSessionRequestMetadata](#updatesessionrequestmetadata) + - [UpdateSessionRequestMetadata](#updatesessionrequestmetadata-1) + +## UpdateSessionRequestMetadata + +[Show source in update_session_request_metadata.py:14](../../../../../../../julep/api/types/update_session_request_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class UpdateSessionRequestMetadata(pydantic.BaseModel): ... +``` + +### UpdateSessionRequestMetadata().dict + +[Show source in update_session_request_metadata.py:27](../../../../../../../julep/api/types/update_session_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### UpdateSessionRequestMetadata().json + +[Show source in update_session_request_metadata.py:19](../../../../../../../julep/api/types/update_session_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/update_user_request_metadata.md b/docs/python-sdk-docs/julep/api/types/update_user_request_metadata.md new file mode 100644 index 000000000..83cfc639c --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/update_user_request_metadata.md @@ -0,0 +1,40 @@ +# UpdateUserRequestMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / UpdateUserRequestMetadata + +> Auto-generated documentation for [julep.api.types.update_user_request_metadata](../../../../../../../julep/api/types/update_user_request_metadata.py) module. + +- [UpdateUserRequestMetadata](#updateuserrequestmetadata) + - [UpdateUserRequestMetadata](#updateuserrequestmetadata-1) + +## UpdateUserRequestMetadata + +[Show source in update_user_request_metadata.py:14](../../../../../../../julep/api/types/update_user_request_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class UpdateUserRequestMetadata(pydantic.BaseModel): ... +``` + +### UpdateUserRequestMetadata().dict + +[Show source in update_user_request_metadata.py:27](../../../../../../../julep/api/types/update_user_request_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### UpdateUserRequestMetadata().json + +[Show source in update_user_request_metadata.py:19](../../../../../../../julep/api/types/update_user_request_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/api/types/user.md b/docs/python-sdk-docs/julep/api/types/user.md index 3b7b1a509..01190a280 100644 --- a/docs/python-sdk-docs/julep/api/types/user.md +++ b/docs/python-sdk-docs/julep/api/types/user.md @@ -9,7 +9,7 @@ ## User -[Show source in user.py:14](../../../../../../../julep/api/types/user.py#L14) +[Show source in user.py:15](../../../../../../../julep/api/types/user.py#L15) #### Signature @@ -19,7 +19,7 @@ class User(pydantic.BaseModel): ... ### User().dict -[Show source in user.py:33](../../../../../../../julep/api/types/user.py#L33) +[Show source in user.py:37](../../../../../../../julep/api/types/user.py#L37) #### Signature @@ -29,7 +29,7 @@ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... ### User().json -[Show source in user.py:25](../../../../../../../julep/api/types/user.py#L25) +[Show source in user.py:29](../../../../../../../julep/api/types/user.py#L29) #### Signature diff --git a/docs/python-sdk-docs/julep/api/types/user_metadata.md b/docs/python-sdk-docs/julep/api/types/user_metadata.md new file mode 100644 index 000000000..e9c9736c2 --- /dev/null +++ b/docs/python-sdk-docs/julep/api/types/user_metadata.md @@ -0,0 +1,40 @@ +# UserMetadata + +[Julep Python SDK Index](../../../README.md#julep-python-sdk-index) / [Julep](../../index.md#julep) / [Api](../index.md#api) / [Types](./index.md#types) / UserMetadata + +> Auto-generated documentation for [julep.api.types.user_metadata](../../../../../../../julep/api/types/user_metadata.py) module. + +- [UserMetadata](#usermetadata) + - [UserMetadata](#usermetadata-1) + +## UserMetadata + +[Show source in user_metadata.py:14](../../../../../../../julep/api/types/user_metadata.py#L14) + +Optional metadata + +#### Signature + +```python +class UserMetadata(pydantic.BaseModel): ... +``` + +### UserMetadata().dict + +[Show source in user_metadata.py:27](../../../../../../../julep/api/types/user_metadata.py#L27) + +#### Signature + +```python +def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: ... +``` + +### UserMetadata().json + +[Show source in user_metadata.py:19](../../../../../../../julep/api/types/user_metadata.py#L19) + +#### Signature + +```python +def json(self, **kwargs: typing.Any) -> str: ... +``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/client.md b/docs/python-sdk-docs/julep/client.md index 4b6fe67e9..3241beaee 100644 --- a/docs/python-sdk-docs/julep/client.md +++ b/docs/python-sdk-docs/julep/client.md @@ -10,7 +10,7 @@ ## AsyncClient -[Show source in client.py:138](../../../../../julep/client.py#L138) +[Show source in client.py:155](../../../../../julep/client.py#L155) A class representing an asynchronous client for interacting with various managers. @@ -66,7 +66,7 @@ class AsyncClient: ## Client -[Show source in client.py:38](../../../../../julep/client.py#L38) +[Show source in client.py:39](../../../../../julep/client.py#L39) A class that encapsulates managers for different aspects of a system and provides an interface for interacting with an API. @@ -103,6 +103,9 @@ class Client: self, api_key: Optional[str] = JULEP_API_KEY, base_url: Optional[str] = JULEP_API_URL, + timeout: int = 300, + additional_headers: Dict[str, str] = {}, + _httpx_client: Optional[httpx.Client] = None, *args, **kwargs ): ... diff --git a/docs/python-sdk-docs/julep/env.md b/docs/python-sdk-docs/julep/env.md index 95ea01221..b0a6fe385 100644 --- a/docs/python-sdk-docs/julep/env.md +++ b/docs/python-sdk-docs/julep/env.md @@ -3,4 +3,12 @@ [Julep Python SDK Index](../README.md#julep-python-sdk-index) / [Julep](./index.md#julep) / Env > Auto-generated documentation for [julep.env](../../../../../julep/env.py) module. + +#### Attributes + +- `env` - Initialize the environment variable handler.: Env() + +- `JULEP_API_KEY`: `Optional[str]` - Optional environment variable for the Julep API key. Defaults to None if not set.: env.str('JULEP_API_KEY', None) + +- `JULEP_API_URL`: `Optional[str]` - Optional environment variable for the Julep API URL. Defaults to the Julep API's default environment URL if not set.: env.str('JULEP_API_URL', JulepApiEnvironment.DEFAULT.value) - [Env](#env) diff --git a/docs/python-sdk-docs/julep/managers/agent.md b/docs/python-sdk-docs/julep/managers/agent.md index b76cfe8b7..aaf04fd29 100644 --- a/docs/python-sdk-docs/julep/managers/agent.md +++ b/docs/python-sdk-docs/julep/managers/agent.md @@ -25,7 +25,7 @@ class AgentCreateArgs(TypedDict): ... ## AgentUpdateArgs -[Show source in agent.py:52](../../../../../../julep/managers/agent.py#L52) +[Show source in agent.py:53](../../../../../../julep/managers/agent.py#L53) #### Signature @@ -37,7 +37,7 @@ class AgentUpdateArgs(TypedDict): ... ## AgentsManager -[Show source in agent.py:301](../../../../../../julep/managers/agent.py#L301) +[Show source in agent.py:312](../../../../../../julep/managers/agent.py#L312) A class for managing agents, inheriting from [BaseAgentsManager](#baseagentsmanager). @@ -54,33 +54,35 @@ id (Union[str, UUID]): The unique identifier of the agent, which can be either a - `name` *str* - The name of the agent. - `about` *str* - A description of the agent. -instructions (Union[List[str], List[InstructionDict]]): A list of instructions or dictionaries defining instructions. +- `instructions` *List[str]* - A list of instructions or dictionaries defining instructions. - `tools` *List[ToolDict], optional* - A list of dictionaries defining tools. Defaults to an empty list. - `functions` *List[FunctionDefDict], optional* - A list of dictionaries defining functions. Defaults to an empty list. - `default_settings` *DefaultSettingsDict, optional* - A dictionary of default settings. Defaults to an empty dictionary. - `model` *ModelName, optional* - The model name to be used. Defaults to 'julep-ai/samantha-1-turbo'. - `docs` *List[DocDict], optional* - A list of dictionaries defining documentation. Defaults to an empty list. +metadata (Dict[str, Any]) - `limit` *Optional[int], optional* - The maximum number of agents to retrieve. Defaults to None, meaning no limit. - `offset` *Optional[int], optional* - The number of agents to skip (for pagination). Defaults to None. agent_id (Union[str, UUID]): The unique identifier of the agent to be deleted. -- `update(*,` *agent_id* - Union[str, UUID], about: Optional[str]=None, instructions: Optional[Union[List[str], List[InstructionDict]]]=None, name: Optional[str]=None, model: Optional[str]=None, default_settings: Optional[DefaultSettingsDict]=None) -> ResourceUpdatedResponse: +- `update(*,` *agent_id* - Union[str, UUID], about: Optional[str]=None, instructions: Optional[List[str]]=None, name: Optional[str]=None, model: Optional[str]=None, default_settings: Optional[DefaultSettingsDict]=None) -> ResourceUpdatedResponse: Updates an existing agent with new details. agent_id (Union[str, UUID]): The unique identifier of the agent to be updated. - `about` *Optional[str], optional* - A new description of the agent. Defaults to None (no change). -instructions (Optional[Union[List[str], List[InstructionDict]]], optional): A new list of instructions or dictionaries defining instructions. Defaults to None (no change). +- `instructions` *Optional[List[str]], optional* - A new list of instructions or dictionaries defining instructions. Defaults to None (no change). - `name` *Optional[str], optional* - A new name for the agent. Defaults to None (no change). - `model` *Optional[str], optional* - A new model name to be used. Defaults to None (no change). - `default_settings` *Optional[DefaultSettingsDict], optional* - A new dictionary of default settings. Defaults to None (no change). +metadata (Dict[str, Any]) #### Returns - `Agent` - The agent with the corresponding identifier. -- `create(*,` *name* - str, about: str, instructions: Union[List[str], List[InstructionDict]], tools: List[ToolDict]=[], functions: List[FunctionDefDict]=[], default_settings: DefaultSettingsDict={}, model: ModelName='julep-ai/samantha-1-turbo', docs: List[DocDict]=[]) -> ResourceCreatedResponse: +- `create(*,` *name* - str, about: str, instructions: List[str], tools: List[ToolDict]=[], functions: List[FunctionDefDict]=[], default_settings: DefaultSettingsDict={}, model: ModelName='julep-ai/samantha-1-turbo', docs: List[DocDict]=[]) -> ResourceCreatedResponse: Creates a new agent with the provided details. - `ResourceCreatedResponse` - The response indicating the resource (agent) was successfully created. @@ -107,7 +109,7 @@ class AgentsManager(BaseAgentsManager): ... ### AgentsManager().create -[Show source in agent.py:381](../../../../../../julep/managers/agent.py#L381) +[Show source in agent.py:394](../../../../../../julep/managers/agent.py#L394) Creates a new resource with the specified details. @@ -115,12 +117,13 @@ Creates a new resource with the specified details. - `name` *str* - The name of the resource. - `about` *str* - A description of the resource. -instructions (Union[List[str], List[InstructionDict]]): A list of instructions or dictionaries with instruction details. +- `instructions` *List[str]* - A list of instructions or dictionaries with instruction details. - `tools` *List[ToolDict], optional* - A list of dictionaries with tool details. Defaults to an empty list. - `functions` *List[FunctionDefDict], optional* - A list of dictionaries with function definition details. Defaults to an empty list. - `default_settings` *DefaultSettingsDict, optional* - A dictionary with default settings. Defaults to an empty dictionary. - `model` *ModelName, optional* - The name of the model to use. Defaults to 'julep-ai/samantha-1-turbo'. - `docs` *List[DocDict], optional* - A list of dictionaries with documentation details. Defaults to an empty list. +metadata (Dict[str, Any]) #### Returns @@ -144,7 +147,7 @@ def create(self, **kwargs: AgentCreateArgs) -> Agent: ... ### AgentsManager().delete -[Show source in agent.py:435](../../../../../../julep/managers/agent.py#L435) +[Show source in agent.py:453](../../../../../../julep/managers/agent.py#L453) Delete the agent with the specified ID. @@ -167,7 +170,7 @@ def delete(self, agent_id: Union[str, UUID]): ... ### AgentsManager().get -[Show source in agent.py:364](../../../../../../julep/managers/agent.py#L364) +[Show source in agent.py:377](../../../../../../julep/managers/agent.py#L377) Retrieve an Agent object by its identifier. @@ -193,7 +196,7 @@ def get(self, id: Union[str, UUID]) -> Agent: ... ### AgentsManager().list -[Show source in agent.py:406](../../../../../../julep/managers/agent.py#L406) +[Show source in agent.py:420](../../../../../../julep/managers/agent.py#L420) List the Agent objects, possibly with pagination. @@ -219,13 +222,16 @@ List the Agent objects, possibly with pagination. ```python @beartype def list( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> List[Agent]: ... ``` ### AgentsManager().update -[Show source in agent.py:452](../../../../../../julep/managers/agent.py#L452) +[Show source in agent.py:470](../../../../../../julep/managers/agent.py#L470) Update the properties of a resource. @@ -235,10 +241,12 @@ This function updates various attributes of an existing resource based on the pr agent_id (Union[str, UUID]): The identifier of the agent, either as a string or a UUID object. - `about` *Optional[str], optional* - A brief description of the agent. Defaults to None. -instructions (Optional[Union[List[str], List[InstructionDict]]], optional): A list of instructions or instruction dictionaries to update the agent with. Defaults to None. +- `instructions` *Optional[List[str]], optional* - A list of instructions or instruction dictionaries to update the agent with. Defaults to None. - `name` *Optional[str], optional* - The new name to assign to the agent. Defaults to None. - `model` *Optional[str], optional* - The model identifier to associate with the agent. Defaults to None. - `default_settings` *Optional[DefaultSettingsDict], optional* - A dictionary of default settings to apply to the agent. Defaults to None. +metadata (Dict[str, Any]) +- `overwrite` *bool, optional* - Whether to overwrite the existing agent settings. Defaults to False. #### Returns @@ -264,7 +272,7 @@ def update(self, agent_id: Union[str, UUID], **kwargs: AgentUpdateArgs) -> Agent ## AsyncAgentsManager -[Show source in agent.py:478](../../../../../../julep/managers/agent.py#L478) +[Show source in agent.py:499](../../../../../../julep/managers/agent.py#L499) A class for managing asynchronous agent operations. @@ -287,12 +295,13 @@ id (Union[UUID, str]): The unique identifier of the agent to retrieve. - `name` *str* - The name of the agent to create. - `about` *str* - A description of the agent. -instructions (Union[List[str], List[InstructionDict]]): The instructions for operating the agent. +- `instructions` *List[str]* - The instructions for operating the agent. - `tools` *List[ToolDict], optional* - An optional list of tools for the agent. - `functions` *List[FunctionDefDict], optional* - An optional list of functions the agent can perform. - `default_settings` *DefaultSettingsDict, optional* - Optional default settings for the agent. - `model` *ModelName, optional* - The model name to associate with the agent, defaults to 'julep-ai/samantha-1-turbo'. - `docs` *List[DocDict], optional* - An optional list of documents associated with the agent. +metadata (Dict[str, Any]) - `limit` *Optional[int], optional* - The maximum number of agents to retrieve. - `offset` *Optional[int], optional* - The number of agents to skip before starting to collect the results. @@ -301,10 +310,11 @@ agent_id (Union[str, UUID]): The unique identifier of the agent to delete. agent_id (Union[str, UUID]): The unique identifier of the agent to update. - `about` *Optional[str], optional* - An optional new description for the agent. -instructions (Optional[Union[List[str], List[InstructionDict]]], optional): Optional new instructions for the agent. +- `instructions` *Optional[List[str]], optional* - Optional new instructions for the agent. - `name` *Optional[str], optional* - An optional new name for the agent. - `model` *Optional[str], optional* - Optional new model associated with the agent. - `default_settings` *Optional[DefaultSettingsDict], optional* - Optional new default settings for the agent. +metadata (Dict[str, Any]) #### Returns @@ -316,17 +326,17 @@ create: - `ResourceCreatedResponse` - A response indicating the agent was created successfully. list: - Lists agents with optional pagination. + Asynchronously lists agents with optional pagination and returns an awaitable object. - `List[Agent]` - A list of agents. delete: - Deletes an agent by its ID. + Asynchronously deletes an agent by its ID and returns an awaitable object. The response from the delete operation (specific return type may vary). update: - Updates the specified fields of an agent by its ID. + Asynchronously updates the specified fields of an agent by its ID and returns an awaitable object. - `ResourceUpdatedResponse` - A response indicating the agent was updated successfully. @@ -342,7 +352,7 @@ class AsyncAgentsManager(BaseAgentsManager): ... ### AsyncAgentsManager().create -[Show source in agent.py:568](../../../../../../julep/managers/agent.py#L568) +[Show source in agent.py:591](../../../../../../julep/managers/agent.py#L591) Create a new resource asynchronously with specified details. @@ -352,12 +362,13 @@ This function is decorated with `beartype` to ensure that arguments conform to s - `name` *str* - The name of the resource to create. - `about` *str* - Information or description about the resource. -instructions (Union[List[str], List[InstructionDict]]): A list of strings or dictionaries detailing the instructions for the resource. +- `instructions` *List[str]* - A list of strings or dictionaries detailing the instructions for the resource. - `tools` *List[ToolDict], optional* - A list of dictionaries representing the tools associated with the resource. Defaults to an empty list. - `functions` *List[FunctionDefDict], optional* - A list of dictionaries defining functions that can be performed with the resource. Defaults to an empty list. - `default_settings` *DefaultSettingsDict, optional* - A dictionary with default settings for the resource. Defaults to an empty dictionary. - `model` *ModelName, optional* - The model identifier to use for the resource. Defaults to 'julep-ai/samantha-1-turbo'. - `docs` *List[DocDict], optional* - A list of dictionaries containing documentation for the resource. Defaults to an empty list. +metadata (Dict[str, Any]) #### Returns @@ -381,7 +392,7 @@ async def create(self, **kwargs: AgentCreateArgs) -> Agent: ... ### AsyncAgentsManager().delete -[Show source in agent.py:622](../../../../../../julep/managers/agent.py#L622) +[Show source in agent.py:650](../../../../../../julep/managers/agent.py#L650) Asynchronously deletes an agent given its identifier. @@ -404,7 +415,7 @@ async def delete(self, agent_id: Union[str, UUID]): ... ### AsyncAgentsManager().get -[Show source in agent.py:549](../../../../../../julep/managers/agent.py#L549) +[Show source in agent.py:572](../../../../../../julep/managers/agent.py#L572) Asynchronously retrieve an Agent object by its ID. @@ -432,7 +443,7 @@ async def get(self, id: Union[UUID, str]) -> Agent: ... ### AsyncAgentsManager().list -[Show source in agent.py:595](../../../../../../julep/managers/agent.py#L595) +[Show source in agent.py:619](../../../../../../julep/managers/agent.py#L619) Asynchronously lists agents with optional limit and offset. @@ -453,13 +464,16 @@ of agent items. It uses the 'beartype' decorator for runtime type checking. ```python @beartype async def list( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> List[Agent]: ... ``` ### AsyncAgentsManager().update -[Show source in agent.py:637](../../../../../../julep/managers/agent.py#L637) +[Show source in agent.py:665](../../../../../../julep/managers/agent.py#L665) Asynchronously update an agent's details. @@ -469,10 +483,12 @@ This function is decorated with `beartype` to enforce the type checking of param agent_id (Union[str, UUID]): Unique identifier for the agent. It can be a string or a UUID object. - `about` *Optional[str]* - Additional information about the agent. Default is None. -instructions (Optional[Union[List[str], List[InstructionDict]]]): A list of instructions or instruction dictionaries. Default is None. +- `instructions` *Optional[List[str]]* - A list of instructions or instruction dictionaries. Default is None. - `name` *Optional[str]* - The name of the agent. Default is None. - `model` *Optional[str]* - The model identifier or name. Default is None. - `default_settings` *Optional[DefaultSettingsDict]* - Dictionary with default settings for the agent. Default is None. +metadata (Dict[str, Any]) +- `overwrite` *bool* - Whether to overwrite the existing agent settings. Default is False. #### Returns @@ -496,7 +512,7 @@ async def update( ## BaseAgentsManager -[Show source in agent.py:60](../../../../../../julep/managers/agent.py#L60) +[Show source in agent.py:63](../../../../../../julep/managers/agent.py#L63) A class responsible for managing agent entities. @@ -516,39 +532,42 @@ This manager handles CRUD operations for agents including retrieving, creating, id (Union[str, UUID]): The UUID of the agent to retrieve. - `name` *str* - The name of the new agent. - `about` *str* - Description about the new agent. -instructions (Union[List[str], List[InstructionDict]]): List of instructions or instruction dictionaries for the new agent. +- `instructions` *List[str]* - List of instructions or instruction dictionaries for the new agent. - `tools` *List[ToolDict], optional* - List of tool dictionaries. Defaults to an empty list. - `functions` *List[FunctionDefDict], optional* - List of function definition dictionaries. Defaults to an empty list. - `default_settings` *DefaultSettingsDict, optional* - Dictionary of default settings for the new agent. Defaults to an empty dictionary. - `model` *ModelName, optional* - The model name for the new agent. Defaults to 'julep-ai/samantha-1-turbo'. - `docs` *List[DocDict], optional* - List of document dictionaries for the new agent. Defaults to an empty list. +metadata (Dict[str, Any], optional): Dictionary of metadata for the new agent. Defaults to an empty dictionary. - `limit` *Optional[int], optional* - The maximum number of agents to list. Defaults to None. - `offset` *Optional[int], optional* - The number of agents to skip (for pagination). Defaults to None. +metadata_filter (Dict[str, Any], optional): Filters for querying agents based on metadata. Defaults to an empty dictionary. agent_id (Union[str, UUID]): The UUID of the agent to delete. agent_id (Union[str, UUID]): The UUID of the agent to update. - `about` *Optional[str], optional* - The new description about the agent. -instructions (Optional[Union[List[str], List[InstructionDict]]], optional): The new list of instructions or instruction dictionaries. +- `instructions` *Optional[List[str]], optional* - The new list of instructions or instruction dictionaries. - `name` *Optional[str], optional* - The new name for the agent. - `model` *Optional[str], optional* - The new model name for the agent. - `default_settings` *Optional[DefaultSettingsDict], optional* - The new default settings dictionary for the agent. +metadata (Dict[str, Any]) #### Returns The agent object or an awaitable that resolves to the agent object. -- `_create(self,` *name* - str, about: str, instructions: Union[List[str], List[InstructionDict]], tools: List[ToolDict] = [], functions: List[FunctionDefDict] = [], default_settings: DefaultSettingsDict = {}, model: ModelName = 'julep-ai/samantha-1-turbo', docs: List[DocDict] = []) -> Union[ResourceCreatedResponse, Awaitable[ResourceCreatedResponse]]: +- `_create(self,` *name* - str, about: str, instructions: List[str], tools: List[ToolDict] = [], functions: List[FunctionDefDict] = [], default_settings: DefaultSettingsDict = {}, model: ModelName = 'julep-ai/samantha-1-turbo', docs: List[DocDict] = [], metadata: Dict[str, Any] = {}) -> Union[ResourceCreatedResponse, Awaitable[ResourceCreatedResponse]]: Creates an agent with the given specifications. The response indicating creation or an awaitable that resolves to the creation response. -- `_list_items(self,` *limit* - Optional[int] = None, offset: Optional[int] = None) -> Union[ListAgentsResponse, Awaitable[ListAgentsResponse]]: - Lists agents with pagination support. +- `_list_items(self,` *limit* - Optional[int] = None, offset: Optional[int] = None, metadata_filter: Dict[str, Any] = {}) -> Union[ListAgentsResponse, Awaitable[ListAgentsResponse]]: + Lists agents with pagination support and optional metadata filtering. The list of agents or an awaitable that resolves to the list of agents. - `_delete(self,` *agent_id* - Union[str, UUID]) -> Union[None, Awaitable[None]]: Deletes an agent with the specified UUID. None or an awaitable that resolves to None. -- `_update(self,` *agent_id* - Union[str, UUID], about: Optional[str] = None, instructions: Optional[Union[List[str], List[InstructionDict]]] = None, name: Optional[str] = None, model: Optional[str] = None, default_settings: Optional[DefaultSettingsDict] = None) -> Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: +- `_update(self,` *agent_id* - Union[str, UUID], about: Optional[str] = None, instructions: Optional[List[str]] = None, name: Optional[str] = None, model: Optional[str] = None, default_settings: Optional[DefaultSettingsDict] = None, metadata: Dict[str, Any] = {}) -> Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: Updates the specified fields of an agent. The response indicating successful update or an awaitable that resolves to the update response. @@ -560,7 +579,7 @@ class BaseAgentsManager(BaseManager): ... ### BaseAgentsManager()._create -[Show source in agent.py:135](../../../../../../julep/managers/agent.py#L135) +[Show source in agent.py:141](../../../../../../julep/managers/agent.py#L141) Create a new agent with the specified configuration. @@ -568,12 +587,13 @@ Create a new agent with the specified configuration. - `name` *str* - Name of the agent. - `about` *str* - Information about the agent. -instructions (Union[List[str], List[InstructionDict]]): List of instructions as either string or dictionaries for the agent. +- `instructions` *List[str]* - List of instructions as either string or dictionaries for the agent. - `tools` *List[ToolDict], optional* - List of tool configurations for the agent. Defaults to an empty list. - `functions` *List[FunctionDefDict], optional* - List of function definitions for the agent. Defaults to an empty list. - `default_settings` *DefaultSettingsDict, optional* - Dictionary of default settings for the agent. Defaults to an empty dict. - `model` *ModelName, optional* - The model name identifier. Defaults to 'julep-ai/samantha-1-turbo'. - `docs` *List[DocDict], optional* - List of document configurations for the agent. Defaults to an empty list. +metadata (Dict[str, Any]) #### Returns @@ -595,13 +615,14 @@ and items in the 'instructions' list will be converted to Instruction instances. def _create( self, name: str, - about: str, - instructions: Union[List[str], List[InstructionDict]], + about: str = "", + instructions: List[str] = [], tools: List[ToolDict] = [], functions: List[FunctionDefDict] = [], default_settings: DefaultSettingsDict = {}, model: ModelName = "julep-ai/samantha-1-turbo", docs: List[DocDict] = [], + metadata: Dict[str, Any] = {}, ) -> Union[ResourceCreatedResponse, Awaitable[ResourceCreatedResponse]]: ... ``` @@ -611,7 +632,7 @@ def _create( ### BaseAgentsManager()._delete -[Show source in agent.py:229](../../../../../../julep/managers/agent.py#L229) +[Show source in agent.py:235](../../../../../../julep/managers/agent.py#L235) Delete an agent by its ID. @@ -637,7 +658,7 @@ def _delete(self, agent_id: Union[str, UUID]) -> Union[None, Awaitable[None]]: . ### BaseAgentsManager()._get -[Show source in agent.py:119](../../../../../../julep/managers/agent.py#L119) +[Show source in agent.py:125](../../../../../../julep/managers/agent.py#L125) Retrieves an agent based on the provided identifier. @@ -661,7 +682,7 @@ def _get(self, id: Union[str, UUID]) -> Union[Agent, Awaitable[Agent]]: ... ### BaseAgentsManager()._list_items -[Show source in agent.py:209](../../../../../../julep/managers/agent.py#L209) +[Show source in agent.py:211](../../../../../../julep/managers/agent.py#L211) Lists items with optional pagination. @@ -678,29 +699,34 @@ Returns: ```python def _list_items( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: str = "{}", ) -> Union[ListAgentsResponse, Awaitable[ListAgentsResponse]]: ... ``` ### BaseAgentsManager()._update -[Show source in agent.py:247](../../../../../../julep/managers/agent.py#L247) +[Show source in agent.py:253](../../../../../../julep/managers/agent.py#L253) Update the agent's properties. Args: agent_id (Union[str, UUID]): The unique identifier for the agent, which can be a string or UUID object. about (Optional[str], optional): A brief description of the agent. Defaults to None. - instructions (Optional[Union[List[str], List[InstructionDict]]], optional): A list of either strings or instruction dictionaries that will be converted into Instruction objects. Defaults to None. + instructions (Optional[List[str]], optional): A list of either strings or instruction dictionaries that will be converted into Instruction objects. Defaults to None. name (Optional[str], optional): The name of the agent. Defaults to None. model (Optional[str], optional): The model identifier for the agent. Defaults to None. default_settings (Optional[DefaultSettingsDict], optional): A dictionary of default settings to apply to the agent. Defaults to None. + metadata (Dict[str, Any]) + overwrite (bool, optional): Whether to overwrite the existing agent settings. Defaults to False. Returns: Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: An object representing the response for the resource updated, which can also be an awaitable in asynchronous contexts. Raises: - AssertionError: If the provided agent_id is not a valid UUID v4. + AssertionError: If the provided agent_id is not validated by the is_valid_uuid4 function. Note: This method asserts that the agent_id must be a valid UUID v4. The instructions and default_settings, if provided, are converted into their respective object types before making the update API call. @@ -711,10 +737,12 @@ Note: def _update( self, agent_id: Union[str, UUID], - about: Optional[str] = None, - instructions: Optional[Union[List[str], List[InstructionDict]]] = None, - name: Optional[str] = None, - model: Optional[str] = None, - default_settings: Optional[DefaultSettingsDict] = None, + about: Optional[str] = NotSet, + instructions: List[str] = NotSet, + name: Optional[str] = NotSet, + model: Optional[str] = NotSet, + default_settings: Optional[DefaultSettingsDict] = NotSet, + metadata: Dict[str, Any] = NotSet, + overwrite: bool = False, ) -> Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: ... ``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/managers/base.md b/docs/python-sdk-docs/julep/managers/base.md index ef9e31ee3..242176b4f 100644 --- a/docs/python-sdk-docs/julep/managers/base.md +++ b/docs/python-sdk-docs/julep/managers/base.md @@ -11,15 +11,13 @@ [Show source in base.py:7](../../../../../../julep/managers/base.py#L7) -A class that serves as a base manager for working with different API clients. +A class that serves as a base manager for working with different API clients. This class is responsible for abstracting the complexities of interacting with various API clients, providing a unified interface for higher-level components. Attributes: - api_client (Union[JulepApi, AsyncJulepApi]): A client instance for communicating with an API. - It can either be an instance of JulepApi for synchronous operations or - AsyncJulepApi for asynchronous operations. + api_client (Union[JulepApi, AsyncJulepApi]): A client instance for communicating with an API. This attribute is essential for enabling the class to perform API operations, whether they are synchronous or asynchronous. Args: - api_client (Union[JulepApi, AsyncJulepApi]): The API client that is used for making API calls. + api_client (Union[JulepApi, AsyncJulepApi]): The API client that is used for making API calls. It is crucial for the operation of this class, allowing it to interact with the API effectively. #### Signature diff --git a/docs/python-sdk-docs/julep/managers/doc.md b/docs/python-sdk-docs/julep/managers/doc.md index 8dfb5a33e..b18d376bc 100644 --- a/docs/python-sdk-docs/julep/managers/doc.md +++ b/docs/python-sdk-docs/julep/managers/doc.md @@ -12,7 +12,7 @@ ## AsyncDocsManager -[Show source in doc.py:327](../../../../../../julep/managers/doc.py#L327) +[Show source in doc.py:339](../../../../../../julep/managers/doc.py#L339) A class for managing asynchronous operations on documents. @@ -24,7 +24,7 @@ Inherited from BaseDocsManager. #### Methods -async get(self, *, agent_id: Optional[Union[str, UUID]] = None, user_id: Optional[Union[str, UUID]] = None, limit: Optional[int] = None, offset: Optional[int] = None) -> List[Doc]: +async list(self, *, agent_id: Optional[Union[str, UUID]] = None, user_id: Optional[Union[str, UUID]] = None, limit: Optional[int] = None, offset: Optional[int] = None) -> List[Doc]: Asynchronously get a list of documents, with optional filtering based on agent_id, user_id, and pagination options limit and offset. #### Arguments @@ -67,7 +67,7 @@ class AsyncDocsManager(BaseDocsManager): ... ### AsyncDocsManager().create -[Show source in doc.py:406](../../../../../../julep/managers/doc.py#L406) +[Show source in doc.py:420](../../../../../../julep/managers/doc.py#L420) Create a new resource asynchronously. @@ -99,7 +99,7 @@ async def create(self, **kwargs: DocsCreateArgs) -> Doc: ... ### AsyncDocsManager().delete -[Show source in doc.py:426](../../../../../../julep/managers/doc.py#L426) +[Show source in doc.py:440](../../../../../../julep/managers/doc.py#L440) Asynchronously deletes a document by its ID. @@ -131,9 +131,9 @@ async def delete( ): ... ``` -### AsyncDocsManager().get +### AsyncDocsManager().list -[Show source in doc.py:367](../../../../../../julep/managers/doc.py#L367) +[Show source in doc.py:379](../../../../../../julep/managers/doc.py#L379) Asynchronously get a list of documents. @@ -163,12 +163,13 @@ The `@beartype` decorator is used to ensure that arguments conform to the expect ```python @beartype -async def get( +async def list( self, agent_id: Optional[Union[str, UUID]] = None, user_id: Optional[Union[str, UUID]] = None, limit: Optional[int] = None, offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> List[Doc]: ... ``` @@ -176,17 +177,17 @@ async def get( ## BaseDocsManager -[Show source in doc.py:27](../../../../../../julep/managers/doc.py#L27) +[Show source in doc.py:29](../../../../../../julep/managers/doc.py#L29) -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. Typical usage example: docs_manager = BaseDocsManager(api_client) -agent_docs = docs_manager._get(agent_id="some-agent-uuid") -user_docs = docs_manager._get(user_id="some-user-uuid") +agent_docs = docs_manager._list(agent_id="some-agent-uuid") +user_docs = docs_manager._list(user_id="some-user-uuid") created_doc = docs_manager._create(agent_id="some-agent-uuid", doc={"key": "value"}) docs_manager._delete(user_id="some-user-uuid", doc_id="some-doc-uuid") @@ -196,7 +197,7 @@ docs_manager._delete(user_id="some-user-uuid", doc_id="some-doc-uuid") #### Methods -- `_get(agent_id` - Optional[Union[str, UUID]], user_id: Optional[Union[str, UUID]], +- `_list(agent_id` - Optional[Union[str, UUID]], user_id: Optional[Union[str, UUID]], - `limit` - Optional[int]=None, offset: Optional[int]=None) -> Union[GetAgentDocsResponse, Awaitable[GetAgentDocsResponse]] Retrieves docsrmation for either an agent or user. Must provide exactly one valid UUID v4 for either `agent_id` or `user_id`. @@ -218,7 +219,7 @@ class BaseDocsManager(BaseManager): ... ### BaseDocsManager()._create -[Show source in doc.py:106](../../../../../../julep/managers/doc.py#L106) +[Show source in doc.py:114](../../../../../../julep/managers/doc.py#L114) Create a new resource with docsrmation for either an agent or a user, but not both. @@ -229,6 +230,7 @@ Args: 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. @@ -248,12 +250,13 @@ def _create( doc: DocDict, agent_id: Optional[Union[str, UUID]] = None, user_id: Optional[Union[str, UUID]] = None, + metadata: Dict[str, Any] = {}, ) -> Union[ResourceCreatedResponse, Awaitable[ResourceCreatedResponse]]: ... ``` ### BaseDocsManager()._delete -[Show source in doc.py:153](../../../../../../julep/managers/doc.py#L153) +[Show source in doc.py:163](../../../../../../julep/managers/doc.py#L163) Delete docs based on either an agent_id or a user_id. @@ -268,7 +271,7 @@ Returns: 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. #### Signature @@ -282,9 +285,9 @@ def _delete( ): ... ``` -### BaseDocsManager()._get +### BaseDocsManager()._list -[Show source in doc.py:60](../../../../../../julep/managers/doc.py#L60) +[Show source in doc.py:62](../../../../../../julep/managers/doc.py#L62) Retrieve docsrmation for an agent or user based on their ID. @@ -298,6 +301,7 @@ agent_id (Optional[Union[str, UUID]]): The UUID v4 of the agent for whom docs is 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 @@ -310,12 +314,13 @@ user_id (Optional[Union[str, UUID]]): The UUID v4 of the user for whom docs is r #### Signature ```python -def _get( +def _list( self, agent_id: Optional[Union[str, UUID]], user_id: Optional[Union[str, UUID]], limit: Optional[int] = None, offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> Union[GetAgentDocsResponse, Awaitable[GetAgentDocsResponse]]: ... ``` @@ -323,7 +328,7 @@ def _get( ## DocsCreateArgs -[Show source in doc.py:21](../../../../../../julep/managers/doc.py#L21) +[Show source in doc.py:22](../../../../../../julep/managers/doc.py#L22) #### Signature @@ -335,7 +340,7 @@ class DocsCreateArgs(TypedDict): ... ## DocsManager -[Show source in doc.py:195](../../../../../../julep/managers/doc.py#L195) +[Show source in doc.py:205](../../../../../../julep/managers/doc.py#L205) A class responsible for managing documents. @@ -391,7 +396,7 @@ class DocsManager(BaseDocsManager): ... ### DocsManager().create -[Show source in doc.py:273](../../../../../../julep/managers/doc.py#L273) +[Show source in doc.py:285](../../../../../../julep/managers/doc.py#L285) Create a new resource with the specified document. @@ -426,7 +431,7 @@ def create(self, **kwargs: DocsCreateArgs) -> Doc: ... ### DocsManager().delete -[Show source in doc.py:296](../../../../../../julep/managers/doc.py#L296) +[Show source in doc.py:308](../../../../../../julep/managers/doc.py#L308) Deletes a document by its identifier. @@ -458,9 +463,9 @@ def delete( ): ... ``` -### DocsManager().get +### DocsManager().list -[Show source in doc.py:240](../../../../../../julep/managers/doc.py#L240) +[Show source in doc.py:250](../../../../../../julep/managers/doc.py#L250) Retrieve a list of documents based on specified criteria. @@ -485,11 +490,12 @@ The `@beartype` decorator is used to ensure that the input arguments are of the ```python @beartype -def get( +def list( self, agent_id: Optional[Union[str, UUID]] = None, user_id: Optional[Union[str, UUID]] = None, limit: Optional[int] = None, offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> List[Doc]: ... ``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/managers/memory.md b/docs/python-sdk-docs/julep/managers/memory.md index 2a75b24dc..11b7d9dc8 100644 --- a/docs/python-sdk-docs/julep/managers/memory.md +++ b/docs/python-sdk-docs/julep/managers/memory.md @@ -11,7 +11,7 @@ ## AsyncMemoriesManager -[Show source in memory.py:135](../../../../../../julep/managers/memory.py#L135) +[Show source in memory.py:134](../../../../../../julep/managers/memory.py#L134) Asynchronously lists memories based on various filter parameters. @@ -42,7 +42,7 @@ class AsyncMemoriesManager(BaseMemoriesManager): ... ### AsyncMemoriesManager().list -[Show source in memory.py:155](../../../../../../julep/managers/memory.py#L155) +[Show source in memory.py:154](../../../../../../julep/managers/memory.py#L154) Asynchronously list memories based on query parameters. @@ -86,8 +86,8 @@ async def list( A base manager class for handling agent memories. -This manager provides an interface to interact with agent memories, allowing -for listing and other operations to manage an agent's memories. +This manager provides an interface to interact with agent memories, facilitating +operations such as listing and retrieving memories based on various criteria. Methods: _list(agent_id, query, types=None, user_id=None, limit=None, offset=None): @@ -155,12 +155,12 @@ def _list( ## MemoriesManager -[Show source in memory.py:81](../../../../../../julep/managers/memory.py#L81) +[Show source in memory.py:80](../../../../../../julep/managers/memory.py#L80) A class for managing memory entities associated with agents. -This class inherits from [BaseMemoriesManager](#basememoriesmanager) and provides -an interface to list memory entities for a given agent. +Inherits from [BaseMemoriesManager](#basememoriesmanager) and extends its functionality to specifically +manage and retrieve memory entities for agents based on query parameters. Attributes: Inherited from [BaseMemoriesManager](#basememoriesmanager). @@ -180,7 +180,7 @@ class MemoriesManager(BaseMemoriesManager): ... ### MemoriesManager().list -[Show source in memory.py:95](../../../../../../julep/managers/memory.py#L95) +[Show source in memory.py:94](../../../../../../julep/managers/memory.py#L94) List memories meeting specified criteria. diff --git a/docs/python-sdk-docs/julep/managers/session.md b/docs/python-sdk-docs/julep/managers/session.md index c360cf165..7e321196a 100644 --- a/docs/python-sdk-docs/julep/managers/session.md +++ b/docs/python-sdk-docs/julep/managers/session.md @@ -13,7 +13,7 @@ ## AsyncSessionsManager -[Show source in session.py:699](../../../../../../julep/managers/session.py#L699) +[Show source in session.py:777](../../../../../../julep/managers/session.py#L777) A class for managing asynchronous sessions. @@ -51,6 +51,8 @@ async suggestions(*, session_id: Union[str, UUID], limit: Optional[int]=None, of async history(*, session_id: Union[str, UUID], limit: Optional[int]=None, offset: Optional[int]=None) -> List[ChatMlMessage]: Retrieves the history of messages in a session, optionally limited and paginated. +- `async` *delete_history(session_id* - Union[str, UUID]) -> None: + #### Notes The `@beartype` decorator is used for runtime type checking of the arguments. @@ -69,7 +71,7 @@ class AsyncSessionsManager(BaseSessionsManager): ... ### AsyncSessionsManager().chat -[Show source in session.py:868](../../../../../../julep/managers/session.py#L868) +[Show source in session.py:952](../../../../../../julep/managers/session.py#L952) Sends a message in an asynchronous chat session and retrieves the response. @@ -142,7 +144,7 @@ async def chat( ### AsyncSessionsManager().create -[Show source in session.py:769](../../../../../../julep/managers/session.py#L769) +[Show source in session.py:849](../../../../../../julep/managers/session.py#L849) Asynchronously create a resource with the specified user and agent identifiers. @@ -177,7 +179,7 @@ async def create(self, **kwargs: SessionCreateArgs) -> Session: ... ### AsyncSessionsManager().delete -[Show source in session.py:818](../../../../../../julep/managers/session.py#L818) +[Show source in session.py:902](../../../../../../julep/managers/session.py#L902) Asynchronously delete a session given its ID. @@ -203,9 +205,34 @@ by the '_delete' method or by the 'beartype' decorator in this section. async def delete(self, session_id: Union[str, UUID]): ... ``` +### AsyncSessionsManager().delete_history + +[Show source in session.py:1097](../../../../../../julep/managers/session.py#L1097) + +Delete the history of a session asynchronously. + +#### Arguments + +session_id (Union[str, UUID]): The unique identifier for the session. + +#### Returns + +- `None` - The result of the delete operation. + +#### Raises + +- `AssertionError` - If the `session_id` is not a valid UUID v4. + +#### Signature + +```python +@beartype +async def delete_history(self, session_id: Union[str, UUID]) -> None: ... +``` + ### AsyncSessionsManager().get -[Show source in session.py:741](../../../../../../julep/managers/session.py#L741) +[Show source in session.py:821](../../../../../../julep/managers/session.py#L821) Asynchronously get a Session object by its identifier. @@ -243,7 +270,7 @@ async def get(self, id: Union[UUID, str]) -> Session: ... ### AsyncSessionsManager().history -[Show source in session.py:981](../../../../../../julep/managers/session.py#L981) +[Show source in session.py:1065](../../../../../../julep/managers/session.py#L1065) Retrieve a history of chat messages based on the session ID, with optional limit and offset. @@ -277,7 +304,7 @@ async def history( ### AsyncSessionsManager().list -[Show source in session.py:792](../../../../../../julep/managers/session.py#L792) +[Show source in session.py:872](../../../../../../julep/managers/session.py#L872) Asynchronously retrieves a list of sessions with optional pagination. @@ -297,13 +324,16 @@ This method utilizes `_list_items` internally to obtain session data with suppor ```python @beartype async def list( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> List[Session]: ... ``` ### AsyncSessionsManager().suggestions -[Show source in session.py:949](../../../../../../julep/managers/session.py#L949) +[Show source in session.py:1033](../../../../../../julep/managers/session.py#L1033) Retrieve a list of suggestions asynchronously. @@ -337,7 +367,7 @@ async def suggestions( ### AsyncSessionsManager().update -[Show source in session.py:837](../../../../../../julep/managers/session.py#L837) +[Show source in session.py:921](../../../../../../julep/managers/session.py#L921) Asynchronously update a resource with the given situation. @@ -380,7 +410,7 @@ async def update(self, **kwargs: SessionUpdateArgs) -> Session: ... ## BaseSessionsManager -[Show source in session.py:47](../../../../../../julep/managers/session.py#L47) +[Show source in session.py:51](../../../../../../julep/managers/session.py#L51) A class to manage sessions using base API client methods. @@ -400,8 +430,8 @@ _get(id): id (Union[str, UUID]): The unique identifier for the session. -user_id (Union[str, UUID]): The unique identifier for the user. agent_id (Union[str, UUID]): The unique identifier for the agent. +user_id (Optional[Union[str, UUID]]): The unique identifier for the user. - `situation` *Optional[str]* - An optional description of the situation for the session. - `limit` *Optional[int]* - The limit on the number of items to be retrieved. @@ -426,13 +456,12 @@ session_id (Union[str, UUID]): The unique identifier for the session. - `limit` *Optional[int]* - The limit on the number of history entries to be retrieved. - `offset` *Optional[int]* - The number of history entries to be skipped before starting to collect the result set. +session_id (Union[str, UUID]): The unique identifier for the session. + #### Returns - `Union[Session,` *Awaitable[Session]]* - The session object or an awaitable yielding it. -_create(user_id, agent_id, situation): - Create a new session with specified user and agent identifiers. - - `Union[ResourceCreatedResponse,` *Awaitable[ResourceCreatedResponse]]* - The response for the created session or an awaitable yielding it. _list_items(limit, offset): @@ -465,6 +494,19 @@ _history(session_id, limit, offset): - `Union[GetHistoryResponse,` *Awaitable[GetHistoryResponse]]* - The history response for the session or an awaitable yielding it. +_delete_history(session_id): + Delete the history of a session. + +- `Union[None,` *Awaitable[None]]* - None or an awaitable yielding None if the operation is successful. + +#### Raises + +- `ValueError` - If the `id` is not a valid UUID. +- `NetworkError` - If there is an issue communicating with the API. + +_create(user_id, agent_id, situation): + Create a new session with specified user and agent identifiers. + #### Signature ```python @@ -473,7 +515,7 @@ class BaseSessionsManager(BaseManager): ... ### BaseSessionsManager()._chat -[Show source in session.py:259](../../../../../../julep/managers/session.py#L259) +[Show source in session.py:293](../../../../../../julep/managers/session.py#L293) Conducts a chat conversation with an AI model using specific parameters. @@ -540,7 +582,7 @@ def _chat( ### BaseSessionsManager()._create -[Show source in session.py:159](../../../../../../julep/managers/session.py#L159) +[Show source in session.py:176](../../../../../../julep/managers/session.py#L176) Creates a session for a specified user and agent. @@ -548,9 +590,10 @@ This internal method is responsible for creating a session using the API client. #### Arguments -user_id (Union[str, UUID]): The user's identifier which could be a string or a UUID object. agent_id (Union[str, UUID]): The agent's identifier which could be a string or a UUID object. +user_id (Optional[Union[str, UUID]]): The user's identifier which could be a string or a UUID object. - `situation` *Optional[str], optional* - An optional description of the situation. +metadata (Dict[str, Any]) #### Returns @@ -565,15 +608,16 @@ agent_id (Union[str, UUID]): The agent's identifier which could be a string or a ```python def _create( self, - user_id: Union[str, UUID], agent_id: Union[str, UUID], + user_id: Optional[Union[str, UUID]] = None, situation: Optional[str] = None, + metadata: Dict[str, Any] = {}, ) -> Union[ResourceCreatedResponse, Awaitable[ResourceCreatedResponse]]: ... ``` ### BaseSessionsManager()._delete -[Show source in session.py:213](../../../../../../julep/managers/session.py#L213) +[Show source in session.py:238](../../../../../../julep/managers/session.py#L238) Delete a session given its session ID. @@ -597,9 +641,37 @@ Raises: def _delete(self, session_id: Union[str, UUID]) -> Union[None, Awaitable[None]]: ... ``` +### BaseSessionsManager()._delete_history + +[Show source in session.py:421](../../../../../../julep/managers/session.py#L421) + +Delete the history of a session. + +#### Arguments + +session_id (Union[str, UUID]): The unique identifier for the session. + +#### Returns + +- `Union[None,` *Awaitable[None]]* - The result of the delete operation, which can be either +None or an Awaitable that resolves to None, depending on whether this is a synchronous +or asynchronous call. + +#### Raises + +- `AssertionError` - If the `session_id` is not a valid UUID v4. + +#### Signature + +```python +def _delete_history( + self, session_id: Union[str, UUID] +) -> Union[None, Awaitable[None]]: ... +``` + ### BaseSessionsManager()._get -[Show source in session.py:143](../../../../../../julep/managers/session.py#L143) +[Show source in session.py:160](../../../../../../julep/managers/session.py#L160) Get a session by its ID. @@ -623,7 +695,7 @@ def _get(self, id: Union[str, UUID]) -> Union[Session, Awaitable[Session]]: ... ### BaseSessionsManager()._history -[Show source in session.py:359](../../../../../../julep/managers/session.py#L359) +[Show source in session.py:393](../../../../../../julep/managers/session.py#L393) Retrieve a session's history with optional pagination controls. @@ -653,7 +725,7 @@ def _history( ### BaseSessionsManager()._list_items -[Show source in session.py:192](../../../../../../julep/managers/session.py#L192) +[Show source in session.py:213](../../../../../../julep/managers/session.py#L213) List items with optional pagination. @@ -674,13 +746,16 @@ The '_list_items' function is assumed to be a method of a class that has an 'api ```python def _list_items( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: str = "{}", ) -> Union[ListSessionsResponse, Awaitable[ListSessionsResponse]]: ... ``` ### BaseSessionsManager()._suggestions -[Show source in session.py:336](../../../../../../julep/managers/session.py#L336) +[Show source in session.py:370](../../../../../../julep/managers/session.py#L370) Retrieve a list of suggestions for a given session. @@ -705,7 +780,7 @@ def _suggestions( ### BaseSessionsManager()._update -[Show source in session.py:234](../../../../../../julep/managers/session.py#L234) +[Show source in session.py:259](../../../../../../julep/managers/session.py#L259) Update a session with a given situation. @@ -713,6 +788,7 @@ Update a session with a given situation. session_id (Union[str, UUID]): The session identifier, which can be a string-formatted UUID or an actual UUID object. - `situation` *str* - A string describing the current situation. +- `overwrite` *bool, optional* - Whether to overwrite the existing situation. Defaults to False. #### Returns @@ -726,7 +802,11 @@ session_id (Union[str, UUID]): The session identifier, which can be a string-for ```python def _update( - self, session_id: Union[str, UUID], situation: str + self, + session_id: Union[str, UUID], + situation: Optional[str] = None, + metadata: Optional[Dict[str, Any]] = None, + overwrite: bool = False, ) -> Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: ... ``` @@ -734,7 +814,7 @@ def _update( ## SessionCreateArgs -[Show source in session.py:36](../../../../../../julep/managers/session.py#L36) +[Show source in session.py:37](../../../../../../julep/managers/session.py#L37) #### Signature @@ -746,7 +826,7 @@ class SessionCreateArgs(TypedDict): ... ## SessionUpdateArgs -[Show source in session.py:42](../../../../../../julep/managers/session.py#L42) +[Show source in session.py:44](../../../../../../julep/managers/session.py#L44) #### Signature @@ -758,7 +838,7 @@ class SessionUpdateArgs(TypedDict): ... ## SessionsManager -[Show source in session.py:388](../../../../../../julep/managers/session.py#L388) +[Show source in session.py:443](../../../../../../julep/managers/session.py#L443) A class responsible for managing session interactions. @@ -822,6 +902,8 @@ history ( Retrieves the chat history for a given session, supported by optional pagination parameters. +- `delete_history` *(session_id* - Union[str, UUID]) -> None: + Each method is decorated with `@beartype` for runtime type enforcement. #### Signature @@ -836,7 +918,7 @@ class SessionsManager(BaseSessionsManager): ... ### SessionsManager().chat -[Show source in session.py:562](../../../../../../julep/managers/session.py#L562) +[Show source in session.py:624](../../../../../../julep/managers/session.py#L624) Initiate a chat session with the provided inputs and configurations. @@ -900,7 +982,7 @@ def chat( ### SessionsManager().create -[Show source in session.py:471](../../../../../../julep/managers/session.py#L471) +[Show source in session.py:528](../../../../../../julep/managers/session.py#L528) Create a new resource with a user ID and an agent ID, optionally including a situation description. @@ -933,7 +1015,7 @@ def create(self, **kwargs: SessionCreateArgs) -> Session: ... ### SessionsManager().delete -[Show source in session.py:519](../../../../../../julep/managers/session.py#L519) +[Show source in session.py:580](../../../../../../julep/managers/session.py#L580) Deletes a session based on its session ID. @@ -956,9 +1038,34 @@ The specific exceptions that `self._delete` might raise, which should be documen def delete(self, session_id: Union[str, UUID]): ... ``` +### SessionsManager().delete_history + +[Show source in session.py:760](../../../../../../julep/managers/session.py#L760) + +Delete the history of a session. + +#### Arguments + +session_id (Union[str, UUID]): The unique identifier for the session. + +#### Returns + +- `None` - The result of the delete operation. + +#### Raises + +- `AssertionError` - If the `session_id` is not a valid UUID v4. + +#### Signature + +```python +@beartype +def delete_history(self, session_id: Union[str, UUID]) -> None: ... +``` + ### SessionsManager().get -[Show source in session.py:454](../../../../../../julep/managers/session.py#L454) +[Show source in session.py:511](../../../../../../julep/managers/session.py#L511) Retrieve a Session object based on a given identifier. @@ -981,7 +1088,7 @@ def get(self, id: Union[str, UUID]) -> Session: ... ### SessionsManager().history -[Show source in session.py:671](../../../../../../julep/managers/session.py#L671) +[Show source in session.py:733](../../../../../../julep/managers/session.py#L733) Retrieve a history of ChatMl messages for a given session. @@ -1009,7 +1116,7 @@ def history( ### SessionsManager().list -[Show source in session.py:492](../../../../../../julep/managers/session.py#L492) +[Show source in session.py:549](../../../../../../julep/managers/session.py#L549) Retrieve a list of Session objects with optional pagination. @@ -1030,13 +1137,16 @@ Raises: ```python @beartype def list( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> List[Session]: ... ``` ### SessionsManager().suggestions -[Show source in session.py:637](../../../../../../julep/managers/session.py#L637) +[Show source in session.py:699](../../../../../../julep/managers/session.py#L699) Provides a list of suggestion objects based on the given session ID. @@ -1074,7 +1184,7 @@ def suggestions( ### SessionsManager().update -[Show source in session.py:535](../../../../../../julep/managers/session.py#L535) +[Show source in session.py:596](../../../../../../julep/managers/session.py#L596) Updates the state of a resource based on a given situation. @@ -1087,6 +1197,7 @@ the actual update process to an internal method '_update'. session_id (Union[str, UUID]): The session identifier, which can be a UUID or a string that uniquely identifies the session. - `situation` *str* - A string that represents the new situation for the resource update. +- `overwrite` *bool, optional* - A flag to indicate whether to overwrite the existing #### Returns diff --git a/docs/python-sdk-docs/julep/managers/tool.md b/docs/python-sdk-docs/julep/managers/tool.md index 0921ef58a..97c0d0573 100644 --- a/docs/python-sdk-docs/julep/managers/tool.md +++ b/docs/python-sdk-docs/julep/managers/tool.md @@ -11,7 +11,7 @@ ## AsyncToolsManager -[Show source in tool.py:344](../../../../../../julep/managers/tool.py#L344) +[Show source in tool.py:351](../../../../../../julep/managers/tool.py#L351) A manager for asynchronous tools handling. @@ -38,7 +38,7 @@ class AsyncToolsManager(BaseToolsManager): ... ### AsyncToolsManager().create -[Show source in tool.py:395](../../../../../../julep/managers/tool.py#L395) +[Show source in tool.py:402](../../../../../../julep/managers/tool.py#L402) Create a new resource asynchronously. @@ -68,7 +68,7 @@ async def create( ### AsyncToolsManager().delete -[Show source in tool.py:422](../../../../../../julep/managers/tool.py#L422) +[Show source in tool.py:429](../../../../../../julep/managers/tool.py#L429) Asynchronously delete a specified agent-tool association. @@ -102,7 +102,7 @@ async def delete(self, agent_id: Union[str, UUID], tool_id: Union[str, UUID]): . ### AsyncToolsManager().get -[Show source in tool.py:360](../../../../../../julep/managers/tool.py#L360) +[Show source in tool.py:367](../../../../../../julep/managers/tool.py#L367) Asynchronously get a list of Tool objects based on provided filters. @@ -139,7 +139,7 @@ async def get( ### AsyncToolsManager().update -[Show source in tool.py:458](../../../../../../julep/managers/tool.py#L458) +[Show source in tool.py:465](../../../../../../julep/managers/tool.py#L465) Asynchronously updates a resource identified by the agent_id and tool_id with a new definition. @@ -177,32 +177,27 @@ async def update( [Show source in tool.py:21](../../../../../../julep/managers/tool.py#L21) -A class to manage base tools by interacting with an API client. +A class to manage tools by interacting with an API client. -This class provides an interface for creating, reading, updating, and deleting tools, where each tool is associated with an agent. +This class provides methods for creating, reading, updating, and deleting tools associated with agents. It ensures the validity of UUIDs for agent_id and tool_id where applicable and handles both synchronous and asynchronous operations. #### Attributes -- `api_client` - The API client utilized to send requests to the service. +- `api_client` - The API client used to send requests to the service. #### Methods - `_get(self,` *agent_id* - Union[str, UUID], limit: Optional[int]=None, offset: Optional[int]=None) -> Union[GetAgentToolsResponse, Awaitable[GetAgentToolsResponse]]: - Retrieve a list of tools associated with the given agent using the API client. + Retrieves a list of tools associated with the specified agent. Supports pagination through limit and offset parameters. - `_create(self,` *agent_id* - Union[str, UUID], tool: ToolDict) -> Union[ResourceCreatedResponse, Awaitable[ResourceCreatedResponse]]: - Create a new tool associated with the given agent using the API client. + Creates a new tool associated with the specified agent. - `_update(self,` *agent_id* - Union[str, UUID], tool_id: Union[str, UUID], function: FunctionDefDict) -> Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: - Update the definition of an existing tool associated with the given agent using the API client. + Updates the definition of an existing tool associated with the specified agent. - `_delete(self,` *agent_id* - Union[str, UUID], tool_id: Union[str, UUID]): - Delete a tool associated with the given agent using the API client. - -#### Notes - -All methods assert the validity of UUIDs for agent_id and tool_id when applicable. -The _get, _create, and _update methods may return either synchronous or asynchronous responses, indicated by the return type Union[..., Awaitable[...]]. + Deletes a tool associated with the specified agent. #### Signature @@ -212,7 +207,7 @@ class BaseToolsManager(BaseManager): ... ### BaseToolsManager()._create -[Show source in tool.py:80](../../../../../../julep/managers/tool.py#L80) +[Show source in tool.py:76](../../../../../../julep/managers/tool.py#L76) Create a new tool associated with a given agent. @@ -234,7 +229,7 @@ def _create( ### BaseToolsManager()._delete -[Show source in tool.py:137](../../../../../../julep/managers/tool.py#L137) +[Show source in tool.py:141](../../../../../../julep/managers/tool.py#L141) Delete a tool associated with an agent. @@ -256,7 +251,7 @@ def _delete(self, agent_id: Union[str, UUID], tool_id: Union[str, UUID]): ... ### BaseToolsManager()._get -[Show source in tool.py:48](../../../../../../julep/managers/tool.py#L48) +[Show source in tool.py:44](../../../../../../julep/managers/tool.py#L44) Retrieve tools associated with the given agent. @@ -293,7 +288,7 @@ def _get( ### BaseToolsManager()._update -[Show source in tool.py:105](../../../../../../julep/managers/tool.py#L105) +[Show source in tool.py:101](../../../../../../julep/managers/tool.py#L101) Update the tool definition for a given agent. @@ -301,6 +296,7 @@ Args: agent_id (Union[str, UUID]): The unique identifier for the agent, either in string or UUID format. tool_id (Union[str, UUID]): The unique identifier for the tool, either in string or UUID format. function (FunctionDefDict): A dictionary containing the function definition that conforms with the required API schema. + overwrite (bool): A flag to indicate whether to overwrite the existing function definition. Defaults to False. Returns: Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: The updated resource response sync or async. @@ -316,6 +312,7 @@ def _update( agent_id: Union[str, UUID], tool_id: Union[str, UUID], function: FunctionDefDict, + overwrite: bool = False, ) -> Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: ... ``` @@ -323,7 +320,7 @@ def _update( ## ToolsManager -[Show source in tool.py:165](../../../../../../julep/managers/tool.py#L165) +[Show source in tool.py:169](../../../../../../julep/managers/tool.py#L169) A manager class for handling tools related to agents. @@ -383,7 +380,7 @@ class ToolsManager(BaseToolsManager): ... ### ToolsManager().create -[Show source in tool.py:247](../../../../../../julep/managers/tool.py#L247) +[Show source in tool.py:251](../../../../../../julep/managers/tool.py#L251) Create a new resource with the provided agent identifier and tool information. @@ -423,7 +420,7 @@ def create( ### ToolsManager().delete -[Show source in tool.py:285](../../../../../../julep/managers/tool.py#L285) +[Show source in tool.py:289](../../../../../../julep/managers/tool.py#L289) Deletes an agent's access to a specific tool. @@ -449,7 +446,7 @@ def delete(self, agent_id: Union[str, UUID], tool_id: Union[str, UUID]): ... ### ToolsManager().get -[Show source in tool.py:216](../../../../../../julep/managers/tool.py#L216) +[Show source in tool.py:220](../../../../../../julep/managers/tool.py#L220) Retrieve a list of Tool objects for the specified agent. @@ -481,7 +478,7 @@ def get( ### ToolsManager().update -[Show source in tool.py:310](../../../../../../julep/managers/tool.py#L310) +[Show source in tool.py:314](../../../../../../julep/managers/tool.py#L314) Update a specific tool definition for an agent. @@ -490,6 +487,7 @@ Update a specific tool definition for an agent. agent_id (Union[str, UUID]): The unique identifier of the agent. tool_id (Union[str, UUID]): The unique identifier of the tool to be updated. - `function` *FunctionDefDict* - A dictionary containing the new definition of the tool. +- `overwrite` *bool* - A flag indicating whether to overwrite the existing definition. #### Returns @@ -514,5 +512,6 @@ def update( agent_id: Union[str, UUID], tool_id: Union[str, UUID], function: FunctionDefDict, + overwrite: bool = False, ) -> ResourceUpdatedResponse: ... ``` \ No newline at end of file diff --git a/docs/python-sdk-docs/julep/managers/types.md b/docs/python-sdk-docs/julep/managers/types.md index d4692e2a4..03813b1c6 100644 --- a/docs/python-sdk-docs/julep/managers/types.md +++ b/docs/python-sdk-docs/julep/managers/types.md @@ -3,4 +3,20 @@ [Julep Python SDK Index](../../README.md#julep-python-sdk-index) / [Julep](../index.md#julep) / [Managers](./index.md#managers) / Types > Auto-generated documentation for [julep.managers.types](../../../../../../julep/managers/types.py) module. + +#### Attributes + +- `ChatSettingsResponseFormatDict` - Represents the settings for chat response formatting, used in configuring agent chat behavior.: TypedDict('ChatSettingsResponseFormat', **{k: v.outer_type_ for (k, v) in ChatSettingsResponseFormat.__fields__.items()}) + +- `InputChatMlMessageDict` - Represents an input message for chat in ML format, used for processing chat inputs.: TypedDict('InputChatMlMessage', **{k: v.outer_type_ for (k, v) in InputChatMlMessage.__fields__.items()}) + +- `ToolDict` - Represents the structure of a tool, used for defining tools within the system.: TypedDict('Tool', **{k: v.outer_type_ for (k, v) in Tool.__fields__.items()}) + +- `DocDict` - Represents the serialized form of a document, used for API communication.: TypedDict('DocDict', **{k: v.outer_type_ for (k, v) in CreateDoc.__fields__.items()}) + +- `DefaultSettingsDict` - Represents the default settings for an agent, used in agent configuration.: TypedDict('DefaultSettingsDict', **{k: v.outer_type_ for (k, v) in AgentDefaultSettings.__fields__.items()}) + +- `FunctionDefDict` - Represents the definition of a function, used for defining functions within the system.: TypedDict('FunctionDefDict', **{k: v.outer_type_ for (k, v) in FunctionDef.__fields__.items()}) + +- `ToolDict` - Represents the request structure for creating a tool, used in tool creation API calls.: TypedDict('ToolDict', **{k: v.outer_type_ for (k, v) in CreateToolRequest.__fields__.items()}) - [Types](#types) diff --git a/docs/python-sdk-docs/julep/managers/user.md b/docs/python-sdk-docs/julep/managers/user.md index 82f26b6c1..606b2f5c9 100644 --- a/docs/python-sdk-docs/julep/managers/user.md +++ b/docs/python-sdk-docs/julep/managers/user.md @@ -13,7 +13,7 @@ ## AsyncUsersManager -[Show source in user.py:327](../../../../../../julep/managers/user.py#L327) +[Show source in user.py:358](../../../../../../julep/managers/user.py#L358) A class that provides asynchronous management of users extending BaseUsersManager. @@ -52,7 +52,7 @@ class AsyncUsersManager(BaseUsersManager): ... ### AsyncUsersManager().create -[Show source in user.py:371](../../../../../../julep/managers/user.py#L371) +[Show source in user.py:402](../../../../../../julep/managers/user.py#L402) Asynchronously create a new resource with the provided name, description, and documents. @@ -86,7 +86,7 @@ async def create(self, **kwargs: UserCreateArgs) -> User: ... ### AsyncUsersManager().delete -[Show source in user.py:426](../../../../../../julep/managers/user.py#L426) +[Show source in user.py:461](../../../../../../julep/managers/user.py#L461) Asynchronously deletes a user by their user ID. @@ -116,7 +116,7 @@ async def delete(self, user_id: Union[str, UUID]) -> None: ... ### AsyncUsersManager().get -[Show source in user.py:353](../../../../../../julep/managers/user.py#L353) +[Show source in user.py:384](../../../../../../julep/managers/user.py#L384) Fetch a User object asynchronously by its identifier. @@ -143,7 +143,7 @@ async def get(self, id: Union[UUID, str]) -> User: ... ### AsyncUsersManager().list -[Show source in user.py:393](../../../../../../julep/managers/user.py#L393) +[Show source in user.py:424](../../../../../../julep/managers/user.py#L424) Asynchronously lists users with optional limits and offsets. @@ -172,13 +172,16 @@ The actual exception raised by the `beartype` decorator or during the users' ret ```python @beartype async def list( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> List[User]: ... ``` ### AsyncUsersManager().update -[Show source in user.py:452](../../../../../../julep/managers/user.py#L452) +[Show source in user.py:486](../../../../../../julep/managers/user.py#L486) Asynchronously updates user details. @@ -214,7 +217,7 @@ async def update(self, user_id: Union[str, UUID], **kwargs: UserUpdateArgs) -> U ## BaseUsersManager -[Show source in user.py:33](../../../../../../julep/managers/user.py#L33) +[Show source in user.py:36](../../../../../../julep/managers/user.py#L36) A manager class for handling user-related operations through an API client. @@ -243,7 +246,7 @@ class BaseUsersManager(BaseManager): ... ### BaseUsersManager()._create -[Show source in user.py:76](../../../../../../julep/managers/user.py#L76) +[Show source in user.py:79](../../../../../../julep/managers/user.py#L79) Create a new resource with the given name and about information, optionally including additional docs. @@ -255,6 +258,7 @@ This internal method allows for creating a new resource with optional docsrmatio - `about` *str* - A brief description about the new resource. - `docs` *List[DocDict], optional* - A list of dictionaries with documentation-related information. Each dictionary must conform to the structure expected by CreateDoc. Defaults to an empty list. +metadata (Dict[str, Any]) #### Returns @@ -275,13 +279,13 @@ Side effects: ```python def _create( - self, name: str, about: str, docs: List[DocDict] = [] + self, name: str, about: str, docs: List[DocDict] = [], metadata: Dict[str, Any] = {} ) -> Union[ResourceCreatedResponse, Awaitable[ResourceCreatedResponse]]: ... ``` ### BaseUsersManager()._delete -[Show source in user.py:134](../../../../../../julep/managers/user.py#L134) +[Show source in user.py:144](../../../../../../julep/managers/user.py#L144) Delete a user given their user ID. @@ -303,7 +307,7 @@ def _delete(self, user_id: Union[str, UUID]) -> Union[None, Awaitable[None]]: .. ### BaseUsersManager()._get -[Show source in user.py:55](../../../../../../julep/managers/user.py#L55) +[Show source in user.py:58](../../../../../../julep/managers/user.py#L58) Get the user by their ID. @@ -333,7 +337,7 @@ def _get(self, id: Union[str, UUID]) -> Union[User, Awaitable[User]]: ... ### BaseUsersManager()._list_items -[Show source in user.py:115](../../../../../../julep/managers/user.py#L115) +[Show source in user.py:121](../../../../../../julep/managers/user.py#L121) Fetch a list of users, with optional pagination parameters. @@ -349,13 +353,16 @@ Returns: ```python def _list_items( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: str = "{}", ) -> Union[ListUsersResponse, Awaitable[ListUsersResponse]]: ... ``` ### BaseUsersManager()._update -[Show source in user.py:151](../../../../../../julep/managers/user.py#L151) +[Show source in user.py:161](../../../../../../julep/managers/user.py#L161) Update user details for a given user ID. @@ -366,6 +373,8 @@ This method updates the 'about' and/or 'name' fields for the user identified by user_id (Union[str, UUID]): The ID of the user to be updated. Must be a valid UUID v4. - `about` *Optional[str], optional* - The new information about the user. Defaults to None. - `name` *Optional[str], optional* - The new name for the user. Defaults to None. +metadata (Dict[str, Any]) +- `overwrite` *bool, optional* - Whether to overwrite the existing user data. Defaults to False. #### Returns @@ -381,8 +390,10 @@ user_id (Union[str, UUID]): The ID of the user to be updated. Must be a valid UU def _update( self, user_id: Union[str, UUID], - about: Optional[str] = None, - name: Optional[str] = None, + about: Optional[str] = NotSet, + name: Optional[str] = NotSet, + metadata: Dict[str, Any] = NotSet, + overwrite: bool = False, ) -> Union[ResourceUpdatedResponse, Awaitable[ResourceUpdatedResponse]]: ... ``` @@ -402,7 +413,7 @@ class UserCreateArgs(TypedDict): ... ## UserUpdateArgs -[Show source in user.py:28](../../../../../../julep/managers/user.py#L28) +[Show source in user.py:29](../../../../../../julep/managers/user.py#L29) #### Signature @@ -414,7 +425,7 @@ class UserUpdateArgs(TypedDict): ... ## UsersManager -[Show source in user.py:181](../../../../../../julep/managers/user.py#L181) +[Show source in user.py:208](../../../../../../julep/managers/user.py#L208) A class responsible for managing users in a system. @@ -453,7 +464,7 @@ class UsersManager(BaseUsersManager): ... ### UsersManager().create -[Show source in user.py:228](../../../../../../julep/managers/user.py#L228) +[Show source in user.py:255](../../../../../../julep/managers/user.py#L255) Create a new resource with the specified name, about text, and associated docs. @@ -487,7 +498,7 @@ def create(self, **kwargs: UserCreateArgs) -> User: ... ### UsersManager().delete -[Show source in user.py:280](../../../../../../julep/managers/user.py#L280) +[Show source in user.py:311](../../../../../../julep/managers/user.py#L311) Deletes a user based on the provided user ID. @@ -518,7 +529,7 @@ def delete(self, user_id: Union[str, UUID]) -> None: ... ### UsersManager().get -[Show source in user.py:208](../../../../../../julep/managers/user.py#L208) +[Show source in user.py:235](../../../../../../julep/managers/user.py#L235) Retrieve a User object by its identifier. @@ -547,7 +558,7 @@ def get(self, id: Union[str, UUID]) -> User: ... ### UsersManager().list -[Show source in user.py:253](../../../../../../julep/managers/user.py#L253) +[Show source in user.py:280](../../../../../../julep/managers/user.py#L280) Lists the users optionally applying limit and offset. @@ -571,13 +582,16 @@ Lists the users optionally applying limit and offset. ```python @beartype def list( - self, limit: Optional[int] = None, offset: Optional[int] = None + self, + limit: Optional[int] = None, + offset: Optional[int] = None, + metadata_filter: Dict[str, Any] = {}, ) -> List[User]: ... ``` ### UsersManager().update -[Show source in user.py:307](../../../../../../julep/managers/user.py#L307) +[Show source in user.py:337](../../../../../../julep/managers/user.py#L337) Update user information. @@ -588,6 +602,7 @@ This method updates user details such as the `about` text and user's `name` for user_id (Union[str, UUID]): The unique identifier for the user, which can be a string or a UUID object. - `about(Optional[str],` *optional)* - The descriptive information about the user. Defaults to None, indicating that `about` should not be updated if not provided. - `name(Optional[str],` *optional)* - The name of the user. Defaults to None, indicating that `name` should not be updated if not provided. +- `overwrite(bool,` *optional)* - Whether to overwrite the existing user data. Defaults to False. #### Returns diff --git a/docs/python-sdk-docs/julep/utils/openai_patch.md b/docs/python-sdk-docs/julep/utils/openai_patch.md index 195f31d06..e1aa0323e 100644 --- a/docs/python-sdk-docs/julep/utils/openai_patch.md +++ b/docs/python-sdk-docs/julep/utils/openai_patch.md @@ -12,7 +12,19 @@ ## patch_chat_acreate -[Show source in openai_patch.py:84](../../../../../../julep/utils/openai_patch.py#L84) +[Show source in openai_patch.py:95](../../../../../../julep/utils/openai_patch.py#L95) + +Asynchronously patches the `chat.completions.create` method of the OpenAI client. + +This function updates the `chat.completions.create` method to an asynchronous version, enabling the inclusion of additional parameters and adjustments to its behavior. + +#### Arguments + +- client (OpenAI): The OpenAI client instance to be patched. + +#### Returns + +- `-` *OpenAI* - The patched OpenAI client instance with the updated `chat.completions.create` method. #### Signature @@ -24,7 +36,7 @@ def patch_chat_acreate(client: OpenAI): ... ## patch_chat_create -[Show source in openai_patch.py:237](../../../../../../julep/utils/openai_patch.py#L237) +[Show source in openai_patch.py:270](../../../../../../julep/utils/openai_patch.py#L270) #### Signature @@ -38,6 +50,18 @@ def patch_chat_create(client: OpenAI): ... [Show source in openai_patch.py:20](../../../../../../julep/utils/openai_patch.py#L20) +Asynchronously patches the `completions.create` method of the OpenAI client. + +This function replaces the original `completions.create` method with a custom asynchronous version that allows for additional parameters and custom behavior. + +#### Arguments + +- client (OpenAI): The OpenAI client instance to be patched. + +#### Returns + +- `-` *OpenAI* - The patched OpenAI client instance with the modified `completions.create` method. + #### Signature ```python @@ -48,7 +72,19 @@ def patch_completions_acreate(client: OpenAI): ... ## patch_completions_create -[Show source in openai_patch.py:173](../../../../../../julep/utils/openai_patch.py#L173) +[Show source in openai_patch.py:195](../../../../../../julep/utils/openai_patch.py#L195) + +Patches the `completions.create` method (non-async version) of the OpenAI client. + +This function replaces the original `completions.create` method with a custom version that supports additional parameters and custom behavior, without changing it to an asynchronous function. + +#### Arguments + +- client (OpenAI): The OpenAI client instance to be patched. + +#### Returns + +- `-` *OpenAI* - The patched OpenAI client instance with the modified `completions.create` method. #### Signature diff --git a/docs/sdks/python-sdk-docs/client-1.md b/docs/sdks/python-sdk-docs/client-1.md index 3d6e0af0e..8fa2ed3a4 100644 --- a/docs/sdks/python-sdk-docs/client-1.md +++ b/docs/sdks/python-sdk-docs/client-1.md @@ -134,7 +134,7 @@ async def create_agent( self, name: str, about: str, - instructions: typing.Optional[typing.List[Instruction]] = OMIT, + instructions: typing.Optional[typing.List[str]] = OMIT, tools: typing.Optional[typing.List[CreateToolRequest]] = OMIT, default_settings: typing.Optional[AgentDefaultSettings] = OMIT, model: str, @@ -775,7 +775,7 @@ async def update_agent( self, agent_id: str, about: typing.Optional[str] = OMIT, - instructions: typing.Optional[typing.List[Instruction]] = OMIT, + instructions: typing.Optional[typing.List[str]] = OMIT, name: typing.Optional[str] = OMIT, model: typing.Optional[str] = OMIT, default_settings: typing.Optional[AgentDefaultSettings] = OMIT, @@ -987,7 +987,7 @@ def create_agent( self, name: str, about: str, - instructions: typing.Optional[typing.List[Instruction]] = OMIT, + instructions: typing.Optional[typing.List[str]] = OMIT, tools: typing.Optional[typing.List[CreateToolRequest]] = OMIT, default_settings: typing.Optional[AgentDefaultSettings] = OMIT, model: str, @@ -1628,7 +1628,7 @@ def update_agent( self, agent_id: str, about: typing.Optional[str] = OMIT, - instructions: typing.Optional[typing.List[Instruction]] = OMIT, + instructions: typing.Optional[typing.List[str]] = OMIT, name: typing.Optional[str] = OMIT, model: typing.Optional[str] = OMIT, default_settings: typing.Optional[AgentDefaultSettings] = OMIT,