letta-client 1.0.0a6__py3-none-any.whl → 1.0.0a7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- {letta_sdk → letta_client}/__init__.py +8 -8
- {letta_sdk → letta_client}/_base_client.py +1 -1
- {letta_sdk → letta_client}/_client.py +124 -171
- {letta_sdk → letta_client}/_exceptions.py +2 -2
- {letta_sdk → letta_client}/_resource.py +5 -5
- {letta_sdk → letta_client}/_response.py +8 -6
- {letta_sdk → letta_client}/_streaming.py +3 -3
- {letta_sdk → letta_client}/_types.py +1 -1
- {letta_sdk → letta_client}/_utils/_logs.py +3 -3
- {letta_sdk → letta_client}/_utils/_resources_proxy.py +4 -4
- {letta_sdk → letta_client}/_version.py +2 -2
- {letta_sdk → letta_client}/resources/__init__.py +14 -154
- {letta_sdk → letta_client}/resources/agents/__init__.py +28 -42
- {letta_sdk → letta_client}/resources/agents/agents.py +216 -734
- {letta_sdk/resources/agents/core_memory → letta_client/resources/agents}/blocks.py +103 -12
- {letta_sdk → letta_client}/resources/agents/files.py +71 -8
- {letta_sdk → letta_client}/resources/agents/folders.py +90 -3
- letta_client/resources/agents/groups.py +242 -0
- {letta_sdk → letta_client}/resources/agents/messages.py +252 -480
- {letta_sdk → letta_client}/resources/agents/tools.py +135 -22
- letta_sdk/resources/jobs.py → letta_client/resources/archives.py +268 -280
- {letta_sdk/resources/messages → letta_client/resources/batches}/batches.py +35 -152
- letta_client/resources/batches/messages.py +238 -0
- {letta_sdk/resources/agents/core_memory → letta_client/resources/blocks}/__init__.py +14 -14
- letta_client/resources/blocks/agents.py +284 -0
- {letta_sdk/resources → letta_client/resources/blocks}/blocks.py +54 -167
- letta_client/resources/folders/__init__.py +47 -0
- letta_client/resources/folders/agents.py +234 -0
- letta_client/resources/folders/files.py +469 -0
- letta_sdk/resources/providers.py → letta_client/resources/folders/folders.py +292 -309
- {letta_sdk → letta_client}/resources/groups/groups.py +12 -78
- {letta_sdk → letta_client}/resources/groups/messages.py +165 -27
- letta_client/resources/identities/__init__.py +61 -0
- letta_client/resources/identities/agents.py +266 -0
- letta_client/resources/identities/blocks.py +234 -0
- {letta_sdk/resources → letta_client/resources/identities}/identities.py +267 -525
- letta_client/resources/identities/properties.py +174 -0
- letta_client/resources/models/__init__.py +33 -0
- {letta_sdk/resources → letta_client/resources/models}/embeddings.py +26 -49
- {letta_sdk/resources → letta_client/resources/models}/models.py +42 -117
- letta_client/resources/runs/__init__.py +61 -0
- letta_sdk/resources/archives.py → letta_client/resources/runs/messages.py +182 -153
- letta_client/resources/runs/runs.py +460 -0
- letta_sdk/resources/projects.py → letta_client/resources/runs/steps.py +93 -56
- letta_sdk/resources/voice_beta/chat.py → letta_client/resources/runs/usage.py +50 -57
- letta_client/resources/steps/__init__.py +75 -0
- letta_client/resources/steps/feedback.py +198 -0
- letta_client/resources/steps/messages.py +234 -0
- letta_client/resources/steps/metrics.py +167 -0
- letta_client/resources/steps/steps.py +511 -0
- letta_sdk/resources/telemetry.py → letta_client/resources/steps/trace.py +45 -56
- letta_client/resources/templates/__init__.py +33 -0
- letta_client/resources/templates/agents.py +236 -0
- letta_client/resources/templates/templates.py +102 -0
- {letta_sdk/resources/tools → letta_client/resources}/tools.py +239 -425
- letta_client/types/__init__.py +120 -0
- {letta_sdk → letta_client}/types/agent_create_params.py +5 -2
- {letta_sdk → letta_client}/types/agent_environment_variable.py +3 -0
- letta_client/types/agent_export_file_params.py +18 -0
- letta_sdk/types/agent_export_response.py → letta_client/types/agent_export_file_response.py +2 -2
- letta_sdk/types/agent_import_params.py → letta_client/types/agent_import_file_params.py +5 -2
- letta_sdk/types/agent_import_response.py → letta_client/types/agent_import_file_response.py +2 -2
- {letta_sdk → letta_client}/types/agent_list_params.py +19 -2
- {letta_sdk → letta_client}/types/agent_retrieve_params.py +20 -3
- {letta_sdk → letta_client}/types/agent_state.py +131 -3
- {letta_sdk → letta_client}/types/agent_type.py +1 -0
- {letta_sdk → letta_client}/types/agent_update_params.py +12 -0
- {letta_sdk → letta_client}/types/agents/__init__.py +12 -19
- letta_client/types/agents/approval_create_param.py +44 -0
- {letta_sdk → letta_client}/types/agents/approval_request_message.py +10 -2
- letta_client/types/agents/approval_response_message.py +63 -0
- {letta_sdk/types/agents/core_memory → letta_client/types/agents}/block.py +1 -1
- letta_sdk/types/identity_list_blocks_params.py → letta_client/types/agents/block_list_params.py +2 -2
- {letta_sdk/types/agents/core_memory → letta_client/types/agents}/block_update_params.py +1 -0
- letta_client/types/agents/file_list_params.py +40 -0
- letta_client/types/agents/folder_list_params.py +34 -0
- letta_sdk/types/source.py → letta_client/types/agents/folder_list_response.py +10 -6
- letta_client/types/agents/group_list_params.py +37 -0
- letta_client/types/agents/group_list_response.py +10 -0
- {letta_sdk → letta_client}/types/agents/letta_assistant_message_content_union.py +3 -0
- {letta_sdk → letta_client}/types/agents/letta_assistant_message_content_union_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/letta_response.py +0 -4
- {letta_sdk → letta_client}/types/agents/message.py +93 -2
- {letta_sdk → letta_client}/types/agents/message_list_params.py +20 -5
- letta_sdk/types/agent_reset_messages_params.py → letta_client/types/agents/message_reset_params.py +2 -2
- {letta_sdk → letta_client}/types/agents/message_send_async_params.py +12 -3
- {letta_sdk → letta_client}/types/agents/message_send_params.py +12 -3
- letta_sdk/types/agents/message_send_stream_params.py → letta_client/types/agents/message_stream_params.py +14 -5
- {letta_sdk → letta_client}/types/agents/message_update_params.py +4 -0
- {letta_sdk → letta_client}/types/agents/omitted_reasoning_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/omitted_reasoning_content_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/run.py +16 -19
- {letta_sdk → letta_client}/types/agents/text_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/text_content_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/tool_call_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/tool_call_content_param.py +4 -1
- {letta_sdk → letta_client}/types/agents/tool_call_message.py +6 -2
- letta_client/types/agents/tool_list_params.py +34 -0
- {letta_sdk → letta_client}/types/agents/tool_return.py +7 -3
- letta_client/types/agents/tool_return_param.py +25 -0
- letta_client/types/agents/tool_update_approval_params.py +21 -0
- {letta_sdk → letta_client}/types/archive.py +4 -0
- letta_client/types/archive_create_params.py +19 -0
- letta_sdk/types/archive_retrieve_params.py → letta_client/types/archive_list_params.py +2 -2
- letta_sdk/types/archive_retrieve_response.py → letta_client/types/archive_list_response.py +2 -2
- {letta_sdk → letta_client}/types/archive_update_params.py +3 -3
- {letta_sdk/types/messages → letta_client/types}/batch_create_params.py +15 -6
- letta_sdk/types/job.py → letta_client/types/batch_job.py +8 -3
- letta_client/types/batches/__init__.py +6 -0
- letta_sdk/types/messages/batch_list_messages_params.py → letta_client/types/batches/message_list_params.py +2 -2
- letta_sdk/types/messages/batch_list_messages_response.py → letta_client/types/batches/message_list_response.py +2 -2
- {letta_sdk → letta_client}/types/block_list_response.py +1 -1
- letta_client/types/blocks/__init__.py +6 -0
- letta_sdk/types/block_list_agents_params.py → letta_client/types/blocks/agent_list_params.py +22 -5
- letta_sdk/types/agent_list_groups_response.py → letta_client/types/blocks/agent_list_response.py +3 -3
- letta_client/types/child_tool_rule.py +40 -0
- letta_client/types/child_tool_rule_param.py +42 -0
- letta_client/types/folders/__init__.py +10 -0
- letta_sdk/types/folder_list_agents_params.py → letta_client/types/folders/agent_list_params.py +2 -2
- letta_sdk/types/run_list_active_response.py → letta_client/types/folders/agent_list_response.py +2 -4
- letta_sdk/types/folder_list_files_params.py → letta_client/types/folders/file_list_params.py +2 -2
- letta_client/types/folders/file_list_response.py +68 -0
- letta_sdk/types/source_upload_file_params.py → letta_client/types/folders/file_upload_params.py +5 -6
- letta_sdk/types/file_metadata.py → letta_client/types/folders/file_upload_response.py +5 -5
- {letta_sdk → letta_client}/types/groups/__init__.py +1 -1
- {letta_sdk → letta_client}/types/groups/message_send_params.py +12 -3
- letta_sdk/types/groups/message_send_stream_params.py → letta_client/types/groups/message_stream_params.py +14 -5
- {letta_sdk → letta_client}/types/groups/message_update_params.py +4 -0
- letta_sdk/types/health_check_response.py → letta_client/types/health_response.py +2 -2
- letta_client/types/identities/__init__.py +9 -0
- letta_sdk/types/identity_list_agents_params.py → letta_client/types/identities/agent_list_params.py +19 -3
- letta_client/types/identities/agent_list_response.py +10 -0
- letta_client/types/identities/block_list_params.py +34 -0
- letta_sdk/types/agents/folder_list_response.py → letta_client/types/identities/block_list_response.py +3 -3
- letta_sdk/types/identity_upsert_properties_params.py → letta_client/types/identities/property_upsert_params.py +3 -3
- letta_sdk/types/identity_modify_params.py → letta_client/types/identity_update_params.py +2 -2
- {letta_sdk → letta_client}/types/init_tool_rule.py +10 -1
- {letta_sdk → letta_client}/types/init_tool_rule_param.py +10 -1
- {letta_sdk → letta_client}/types/llm_config.py +6 -0
- {letta_sdk → letta_client}/types/llm_config_param.py +6 -0
- {letta_sdk/types/voice_beta → letta_client/types/models}/__init__.py +1 -1
- letta_sdk/types/agents/archival_memory_create_response.py → letta_client/types/models/embedding_list_response.py +3 -3
- {letta_sdk → letta_client}/types/run_list_params.py +29 -5
- letta_client/types/runs/__init__.py +10 -0
- letta_sdk/types/run_list_messages_params.py → letta_client/types/runs/message_list_params.py +5 -2
- letta_client/types/runs/message_list_response.py +10 -0
- letta_sdk/types/run_retrieve_stream_params.py → letta_client/types/runs/message_stream_params.py +2 -2
- letta_sdk/types/run_list_steps_params.py → letta_client/types/runs/step_list_params.py +9 -6
- letta_sdk/types/job_list_response.py → letta_client/types/runs/step_list_response.py +3 -3
- letta_sdk/types/run_retrieve_usage_response.py → letta_client/types/runs/usage_retrieve_response.py +3 -3
- {letta_sdk → letta_client}/types/step.py +6 -6
- letta_client/types/steps/__init__.py +8 -0
- letta_sdk/types/step_update_feedback_params.py → letta_client/types/steps/feedback_create_params.py +3 -3
- letta_sdk/types/step_list_messages_params.py → letta_client/types/steps/message_list_params.py +2 -2
- letta_client/types/steps/message_list_response.py +34 -0
- letta_sdk/types/step_retrieve_metrics_response.py → letta_client/types/steps/metric_retrieve_response.py +6 -6
- {letta_sdk/types/tools → letta_client/types/templates}/__init__.py +2 -0
- letta_sdk/types/template_create_agents_params.py → letta_client/types/templates/agent_create_params.py +4 -4
- {letta_sdk → letta_client}/types/tool.py +6 -0
- {letta_sdk → letta_client}/types/tool_create_params.py +6 -0
- {letta_sdk → letta_client}/types/tool_return_message.py +3 -0
- letta_sdk/types/tool_modify_params.py → letta_client/types/tool_update_params.py +8 -2
- letta_sdk/types/tool_upsert_base_response.py → letta_client/types/tool_upsert_base_tools_response.py +2 -2
- {letta_sdk → letta_client}/types/tool_upsert_params.py +6 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a7.dist-info}/METADATA +110 -70
- letta_client-1.0.0a7.dist-info/RECORD +307 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a7.dist-info}/licenses/LICENSE +1 -1
- letta_client-1.0.0a6.dist-info/RECORD +0 -420
- letta_sdk/resources/_internal_templates/__init__.py +0 -33
- letta_sdk/resources/_internal_templates/_internal_templates.py +0 -961
- letta_sdk/resources/_internal_templates/deployment.py +0 -268
- letta_sdk/resources/agents/archival_memory.py +0 -581
- letta_sdk/resources/agents/core_memory/core_memory.py +0 -278
- letta_sdk/resources/agents/sources.py +0 -332
- letta_sdk/resources/client_side_access_tokens.py +0 -402
- letta_sdk/resources/folders.py +0 -1562
- letta_sdk/resources/health.py +0 -135
- letta_sdk/resources/messages/messages.py +0 -102
- letta_sdk/resources/runs.py +0 -1016
- letta_sdk/resources/sources/__init__.py +0 -33
- letta_sdk/resources/sources/files.py +0 -341
- letta_sdk/resources/sources/sources.py +0 -1371
- letta_sdk/resources/steps.py +0 -784
- letta_sdk/resources/templates.py +0 -1310
- letta_sdk/resources/tools/__init__.py +0 -47
- letta_sdk/resources/tools/composio/__init__.py +0 -33
- letta_sdk/resources/tools/composio/apps.py +0 -214
- letta_sdk/resources/tools/composio/composio.py +0 -201
- letta_sdk/resources/tools/mcp/__init__.py +0 -47
- letta_sdk/resources/tools/mcp/mcp.py +0 -134
- letta_sdk/resources/tools/mcp/oauth.py +0 -214
- letta_sdk/resources/tools/mcp/servers/__init__.py +0 -33
- letta_sdk/resources/tools/mcp/servers/servers.py +0 -1785
- letta_sdk/resources/tools/mcp/servers/tools.py +0 -263
- letta_sdk/resources/voice_beta/__init__.py +0 -33
- letta_sdk/resources/voice_beta/voice_beta.py +0 -102
- letta_sdk/types/__init__.py +0 -226
- letta_sdk/types/_internal_templates/__init__.py +0 -7
- letta_sdk/types/_internal_templates/deployment_delete_response.py +0 -17
- letta_sdk/types/_internal_templates/deployment_list_entities_params.py +0 -15
- letta_sdk/types/_internal_templates/deployment_list_entities_response.py +0 -31
- letta_sdk/types/agent_export_params.py +0 -17
- letta_sdk/types/agent_list_groups_params.py +0 -13
- letta_sdk/types/agent_migrate_params.py +0 -19
- letta_sdk/types/agent_migrate_response.py +0 -11
- letta_sdk/types/agent_retrieve_context_response.py +0 -110
- letta_sdk/types/agent_search_params.py +0 -78
- letta_sdk/types/agent_search_response.py +0 -16
- letta_sdk/types/agent_summarize_params.py +0 -12
- letta_sdk/types/agents/approval_create_param.py +0 -22
- letta_sdk/types/agents/approval_response_message.py +0 -41
- letta_sdk/types/agents/archival_memory_create_params.py +0 -23
- letta_sdk/types/agents/archival_memory_list_params.py +0 -28
- letta_sdk/types/agents/archival_memory_list_response.py +0 -10
- letta_sdk/types/agents/archival_memory_search_params.py +0 -35
- letta_sdk/types/agents/archival_memory_search_response.py +0 -26
- letta_sdk/types/agents/core_memory/__init__.py +0 -7
- letta_sdk/types/agents/core_memory_retrieve_variables_response.py +0 -11
- letta_sdk/types/agents/file_list_params.py +0 -19
- letta_sdk/types/agents/letta_request_param.py +0 -45
- letta_sdk/types/agents/letta_streaming_request_param.py +0 -60
- letta_sdk/types/agents/memory.py +0 -92
- letta_sdk/types/agents/message_preview_raw_payload_params.py +0 -103
- letta_sdk/types/agents/message_preview_raw_payload_response.py +0 -8
- letta_sdk/types/agents/message_search_params.py +0 -38
- letta_sdk/types/agents/message_search_response.py +0 -29
- letta_sdk/types/agents/source_list_response.py +0 -10
- letta_sdk/types/agents/tool_modify_approval_params.py +0 -13
- letta_sdk/types/block_list_agents_response.py +0 -10
- letta_sdk/types/child_tool_rule.py +0 -21
- letta_sdk/types/child_tool_rule_param.py +0 -23
- letta_sdk/types/client_side_access_token_create_params.py +0 -32
- letta_sdk/types/client_side_access_token_create_response.py +0 -34
- letta_sdk/types/client_side_access_token_delete_params.py +0 -11
- letta_sdk/types/client_side_access_token_list_params.py +0 -23
- letta_sdk/types/client_side_access_token_list_response.py +0 -40
- letta_sdk/types/duplicate_file_handling.py +0 -7
- letta_sdk/types/embedding_get_total_storage_size_response.py +0 -7
- letta_sdk/types/file_processing_status.py +0 -7
- letta_sdk/types/folder_get_by_name_response.py +0 -7
- letta_sdk/types/folder_list_agents_response.py +0 -8
- letta_sdk/types/folder_list_files_response.py +0 -10
- letta_sdk/types/folder_list_passages_params.py +0 -34
- letta_sdk/types/folder_list_passages_response.py +0 -10
- letta_sdk/types/folder_retrieve_metadata_params.py +0 -11
- letta_sdk/types/folder_upload_file_params.py +0 -21
- letta_sdk/types/identity_list_agents_response.py +0 -10
- letta_sdk/types/identity_list_blocks_response.py +0 -10
- letta_sdk/types/internal_template_create_agent_params.py +0 -217
- letta_sdk/types/internal_template_create_block_params.py +0 -54
- letta_sdk/types/internal_template_create_group_params.py +0 -49
- letta_sdk/types/job_list_active_params.py +0 -28
- letta_sdk/types/job_list_active_response.py +0 -10
- letta_sdk/types/job_list_params.py +0 -31
- letta_sdk/types/messages/__init__.py +0 -10
- letta_sdk/types/messages/batch_job.py +0 -60
- letta_sdk/types/model_list_embedding_response.py +0 -10
- letta_sdk/types/organization_sources_stats.py +0 -49
- letta_sdk/types/passage.py +0 -56
- letta_sdk/types/project_list_params.py +0 -16
- letta_sdk/types/project_list_response.py +0 -23
- letta_sdk/types/provider.py +0 -42
- letta_sdk/types/provider_check_params.py +0 -30
- letta_sdk/types/provider_create_params.py +0 -33
- letta_sdk/types/provider_list_params.py +0 -42
- letta_sdk/types/provider_list_response.py +0 -10
- letta_sdk/types/provider_update_params.py +0 -25
- letta_sdk/types/run_list_active_params.py +0 -18
- letta_sdk/types/run_list_messages_response.py +0 -10
- letta_sdk/types/run_list_steps_response.py +0 -10
- letta_sdk/types/source_count_response.py +0 -7
- letta_sdk/types/source_create_params.py +0 -33
- letta_sdk/types/source_get_agents_response.py +0 -8
- letta_sdk/types/source_get_by_name_response.py +0 -7
- letta_sdk/types/source_get_metadata_params.py +0 -11
- letta_sdk/types/source_list_passages_params.py +0 -19
- letta_sdk/types/source_list_passages_response.py +0 -10
- letta_sdk/types/source_list_response.py +0 -10
- letta_sdk/types/source_update_params.py +0 -27
- letta_sdk/types/sources/__init__.py +0 -7
- letta_sdk/types/sources/file_list_params.py +0 -26
- letta_sdk/types/sources/file_list_response.py +0 -10
- letta_sdk/types/sources/file_retrieve_params.py +0 -14
- letta_sdk/types/step_list_messages_response.py +0 -34
- letta_sdk/types/template_create_agents_response.py +0 -12
- letta_sdk/types/template_create_params.py +0 -40
- letta_sdk/types/template_create_response.py +0 -29
- letta_sdk/types/template_delete_response.py +0 -9
- letta_sdk/types/template_fork_params.py +0 -17
- letta_sdk/types/template_fork_response.py +0 -29
- letta_sdk/types/template_get_snapshot_response.py +0 -258
- letta_sdk/types/template_list_params.py +0 -34
- letta_sdk/types/template_list_response.py +0 -35
- letta_sdk/types/template_list_versions_params.py +0 -16
- letta_sdk/types/template_list_versions_response.py +0 -29
- letta_sdk/types/template_rename_params.py +0 -14
- letta_sdk/types/template_rename_response.py +0 -9
- letta_sdk/types/template_save_version_params.py +0 -32
- letta_sdk/types/template_save_version_response.py +0 -29
- letta_sdk/types/template_update_description_params.py +0 -14
- letta_sdk/types/template_update_description_response.py +0 -9
- letta_sdk/types/tool_run_params.py +0 -43
- letta_sdk/types/tools/composio/__init__.py +0 -6
- letta_sdk/types/tools/composio/app_list_actions_response.py +0 -70
- letta_sdk/types/tools/composio/app_list_response.py +0 -103
- letta_sdk/types/tools/mcp/__init__.py +0 -21
- letta_sdk/types/tools/mcp/mcp_server_type.py +0 -7
- letta_sdk/types/tools/mcp/oauth_callback_params.py +0 -22
- letta_sdk/types/tools/mcp/server_add_params.py +0 -68
- letta_sdk/types/tools/mcp/server_add_response.py +0 -14
- letta_sdk/types/tools/mcp/server_connect_params.py +0 -68
- letta_sdk/types/tools/mcp/server_delete_response.py +0 -14
- letta_sdk/types/tools/mcp/server_list_response.py +0 -14
- letta_sdk/types/tools/mcp/server_resync_params.py +0 -12
- letta_sdk/types/tools/mcp/server_test_params.py +0 -68
- letta_sdk/types/tools/mcp/server_update_params.py +0 -43
- letta_sdk/types/tools/mcp/server_update_response.py +0 -12
- letta_sdk/types/tools/mcp/servers/__init__.py +0 -6
- letta_sdk/types/tools/mcp/servers/tool_execute_params.py +0 -15
- letta_sdk/types/tools/mcp/servers/tool_list_response.py +0 -85
- letta_sdk/types/tools/mcp/sse_server_config.py +0 -27
- letta_sdk/types/tools/mcp/sse_server_config_param.py +0 -29
- letta_sdk/types/tools/mcp/stdio_server_config.py +0 -24
- letta_sdk/types/tools/mcp/stdio_server_config_param.py +0 -27
- letta_sdk/types/tools/mcp/streamable_http_server_config.py +0 -27
- letta_sdk/types/tools/mcp/streamable_http_server_config_param.py +0 -29
- letta_sdk/types/voice_beta/chat_create_completion_params.py +0 -12
- {letta_sdk → letta_client}/_compat.py +0 -0
- {letta_sdk → letta_client}/_constants.py +0 -0
- {letta_sdk → letta_client}/_files.py +0 -0
- {letta_sdk → letta_client}/_models.py +0 -0
- {letta_sdk → letta_client}/_qs.py +0 -0
- {letta_sdk → letta_client}/_utils/__init__.py +0 -0
- {letta_sdk → letta_client}/_utils/_compat.py +0 -0
- {letta_sdk → letta_client}/_utils/_datetime_parse.py +0 -0
- {letta_sdk → letta_client}/_utils/_proxy.py +0 -0
- {letta_sdk → letta_client}/_utils/_reflection.py +0 -0
- {letta_sdk → letta_client}/_utils/_streams.py +0 -0
- {letta_sdk → letta_client}/_utils/_sync.py +0 -0
- {letta_sdk → letta_client}/_utils/_transform.py +0 -0
- {letta_sdk → letta_client}/_utils/_typing.py +0 -0
- {letta_sdk → letta_client}/_utils/_utils.py +0 -0
- {letta_sdk → letta_client}/lib/.keep +0 -0
- {letta_sdk → letta_client}/py.typed +0 -0
- {letta_sdk/resources/messages → letta_client/resources/batches}/__init__.py +6 -6
- {letta_sdk → letta_client}/resources/groups/__init__.py +0 -0
- {letta_sdk → letta_client}/resources/tags.py +0 -0
- {letta_sdk → letta_client}/types/agent_count_response.py +0 -0
- {letta_sdk → letta_client}/types/agent_list_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/assistant_message.py +0 -0
- {letta_sdk/types/agents/core_memory → letta_client/types/agents}/block_list_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_close_all_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_list_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_open_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/hidden_reasoning_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/image_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/image_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/job_status.py +0 -0
- {letta_sdk → letta_client}/types/agents/job_type.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_message_union.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_user_message_content_union.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_user_message_content_union_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_cancel_params.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_cancel_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_list_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_role.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_type.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_update_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/redacted_reasoning_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/redacted_reasoning_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/system_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_call.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_call_delta.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_list_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_return_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_return_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_assistant_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_reasoning_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_system_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_user_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/user_message.py +0 -0
- {letta_sdk/types/messages → letta_client/types}/batch_list_params.py +0 -0
- {letta_sdk/types/messages → letta_client/types}/batch_list_response.py +0 -0
- {letta_sdk → letta_client}/types/block_count_response.py +0 -0
- {letta_sdk → letta_client}/types/block_create_params.py +0 -0
- {letta_sdk → letta_client}/types/block_list_params.py +0 -0
- {letta_sdk → letta_client}/types/block_update_params.py +0 -0
- {letta_sdk → letta_client}/types/conditional_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/conditional_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/continue_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/continue_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/create_block_param.py +0 -0
- {letta_sdk → letta_client}/types/dynamic_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/embedding_config.py +0 -0
- {letta_sdk → letta_client}/types/embedding_config_param.py +0 -0
- {letta_sdk → letta_client}/types/folder.py +0 -0
- {letta_sdk → letta_client}/types/folder_count_response.py +0 -0
- {letta_sdk → letta_client}/types/folder_create_params.py +0 -0
- {letta_sdk → letta_client}/types/folder_list_params.py +0 -0
- {letta_sdk → letta_client}/types/folder_list_response.py +0 -0
- {letta_sdk → letta_client}/types/folder_update_params.py +0 -0
- {letta_sdk → letta_client}/types/group.py +0 -0
- {letta_sdk → letta_client}/types/group_count_response.py +0 -0
- {letta_sdk → letta_client}/types/group_create_params.py +0 -0
- {letta_sdk → letta_client}/types/group_list_params.py +0 -0
- {letta_sdk → letta_client}/types/group_list_response.py +0 -0
- {letta_sdk → letta_client}/types/group_update_params.py +0 -0
- {letta_sdk → letta_client}/types/groups/message_list_params.py +0 -0
- {letta_sdk → letta_client}/types/groups/message_list_response.py +0 -0
- {letta_sdk → letta_client}/types/groups/message_update_response.py +0 -0
- {letta_sdk → letta_client}/types/identity.py +0 -0
- {letta_sdk → letta_client}/types/identity_count_response.py +0 -0
- {letta_sdk → letta_client}/types/identity_create_params.py +0 -0
- {letta_sdk → letta_client}/types/identity_list_params.py +0 -0
- {letta_sdk → letta_client}/types/identity_list_response.py +0 -0
- {letta_sdk → letta_client}/types/identity_property.py +0 -0
- {letta_sdk → letta_client}/types/identity_property_param.py +0 -0
- {letta_sdk → letta_client}/types/identity_type.py +0 -0
- {letta_sdk → letta_client}/types/identity_upsert_params.py +0 -0
- {letta_sdk → letta_client}/types/json_object_response_format.py +0 -0
- {letta_sdk → letta_client}/types/json_object_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/json_schema_response_format.py +0 -0
- {letta_sdk → letta_client}/types/json_schema_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/letta_message_content_union_param.py +0 -0
- {letta_sdk → letta_client}/types/manager_type.py +0 -0
- {letta_sdk → letta_client}/types/max_count_per_step_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/max_count_per_step_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/message_create_param.py +0 -0
- {letta_sdk → letta_client}/types/model_list_params.py +0 -0
- {letta_sdk → letta_client}/types/model_list_response.py +0 -0
- {letta_sdk → letta_client}/types/npm_requirement.py +0 -0
- {letta_sdk → letta_client}/types/npm_requirement_param.py +0 -0
- {letta_sdk → letta_client}/types/parent_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/parent_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/pip_requirement.py +0 -0
- {letta_sdk → letta_client}/types/pip_requirement_param.py +0 -0
- {letta_sdk → letta_client}/types/provider_category.py +0 -0
- {letta_sdk → letta_client}/types/provider_trace.py +0 -0
- {letta_sdk → letta_client}/types/provider_type.py +0 -0
- {letta_sdk → letta_client}/types/required_before_exit_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/required_before_exit_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/requires_approval_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/requires_approval_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/round_robin_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/run_list_response.py +0 -0
- {letta_sdk → letta_client}/types/sleeptime_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/step_list_params.py +0 -0
- {letta_sdk → letta_client}/types/step_list_response.py +0 -0
- {letta_sdk → letta_client}/types/stop_reason_type.py +0 -0
- {letta_sdk → letta_client}/types/supervisor_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/tag_list_params.py +0 -0
- {letta_sdk → letta_client}/types/tag_list_response.py +0 -0
- {letta_sdk → letta_client}/types/terminal_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/terminal_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/text_response_format.py +0 -0
- {letta_sdk → letta_client}/types/text_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/tool_count_params.py +0 -0
- {letta_sdk → letta_client}/types/tool_count_response.py +0 -0
- {letta_sdk → letta_client}/types/tool_list_params.py +0 -0
- {letta_sdk → letta_client}/types/tool_list_response.py +0 -0
- {letta_sdk → letta_client}/types/tool_type.py +1 -1
- {letta_sdk → letta_client}/types/vector_db_provider.py +0 -0
- {letta_sdk → letta_client}/types/voice_sleeptime_manager_param.py +0 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a7.dist-info}/WHEEL +0 -0
|
@@ -7,38 +7,70 @@ from typing_extensions import Literal
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from
|
|
10
|
+
from .agents import (
|
|
11
|
+
AgentsResource,
|
|
12
|
+
AsyncAgentsResource,
|
|
13
|
+
AgentsResourceWithRawResponse,
|
|
14
|
+
AsyncAgentsResourceWithRawResponse,
|
|
15
|
+
AgentsResourceWithStreamingResponse,
|
|
16
|
+
AsyncAgentsResourceWithStreamingResponse,
|
|
17
|
+
)
|
|
18
|
+
from .blocks import (
|
|
19
|
+
BlocksResource,
|
|
20
|
+
AsyncBlocksResource,
|
|
21
|
+
BlocksResourceWithRawResponse,
|
|
22
|
+
AsyncBlocksResourceWithRawResponse,
|
|
23
|
+
BlocksResourceWithStreamingResponse,
|
|
24
|
+
AsyncBlocksResourceWithStreamingResponse,
|
|
25
|
+
)
|
|
26
|
+
from ...types import (
|
|
11
27
|
IdentityType,
|
|
12
28
|
identity_list_params,
|
|
13
29
|
identity_create_params,
|
|
14
|
-
|
|
30
|
+
identity_update_params,
|
|
15
31
|
identity_upsert_params,
|
|
16
|
-
identity_list_agents_params,
|
|
17
|
-
identity_list_blocks_params,
|
|
18
32
|
)
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
|
|
33
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
34
|
+
from ..._utils import maybe_transform, strip_not_given, async_maybe_transform
|
|
35
|
+
from ..._compat import cached_property
|
|
36
|
+
from .properties import (
|
|
37
|
+
PropertiesResource,
|
|
38
|
+
AsyncPropertiesResource,
|
|
39
|
+
PropertiesResourceWithRawResponse,
|
|
40
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
41
|
+
PropertiesResourceWithStreamingResponse,
|
|
42
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
43
|
+
)
|
|
44
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
45
|
+
from ..._response import (
|
|
24
46
|
to_raw_response_wrapper,
|
|
25
47
|
to_streamed_response_wrapper,
|
|
26
48
|
async_to_raw_response_wrapper,
|
|
27
49
|
async_to_streamed_response_wrapper,
|
|
28
50
|
)
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from
|
|
35
|
-
from ..types.identity_list_agents_response import IdentityListAgentsResponse
|
|
36
|
-
from ..types.identity_list_blocks_response import IdentityListBlocksResponse
|
|
51
|
+
from ..._base_client import make_request_options
|
|
52
|
+
from ...types.identity import Identity
|
|
53
|
+
from ...types.identity_type import IdentityType
|
|
54
|
+
from ...types.identity_list_response import IdentityListResponse
|
|
55
|
+
from ...types.identity_count_response import IdentityCountResponse
|
|
56
|
+
from ...types.identity_property_param import IdentityPropertyParam
|
|
37
57
|
|
|
38
58
|
__all__ = ["IdentitiesResource", "AsyncIdentitiesResource"]
|
|
39
59
|
|
|
40
60
|
|
|
41
61
|
class IdentitiesResource(SyncAPIResource):
|
|
62
|
+
@cached_property
|
|
63
|
+
def properties(self) -> PropertiesResource:
|
|
64
|
+
return PropertiesResource(self._client)
|
|
65
|
+
|
|
66
|
+
@cached_property
|
|
67
|
+
def agents(self) -> AgentsResource:
|
|
68
|
+
return AgentsResource(self._client)
|
|
69
|
+
|
|
70
|
+
@cached_property
|
|
71
|
+
def blocks(self) -> BlocksResource:
|
|
72
|
+
return BlocksResource(self._client)
|
|
73
|
+
|
|
42
74
|
@cached_property
|
|
43
75
|
def with_raw_response(self) -> IdentitiesResourceWithRawResponse:
|
|
44
76
|
"""
|
|
@@ -140,6 +172,8 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
140
172
|
Retrieve Identity
|
|
141
173
|
|
|
142
174
|
Args:
|
|
175
|
+
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
176
|
+
|
|
143
177
|
extra_headers: Send extra headers
|
|
144
178
|
|
|
145
179
|
extra_query: Add additional query parameters to the request
|
|
@@ -158,6 +192,70 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
158
192
|
cast_to=Identity,
|
|
159
193
|
)
|
|
160
194
|
|
|
195
|
+
def update(
|
|
196
|
+
self,
|
|
197
|
+
identity_id: str,
|
|
198
|
+
*,
|
|
199
|
+
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
200
|
+
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
201
|
+
identifier_key: Optional[str] | Omit = omit,
|
|
202
|
+
identity_type: Optional[IdentityType] | Omit = omit,
|
|
203
|
+
name: Optional[str] | Omit = omit,
|
|
204
|
+
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
205
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
206
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
207
|
+
extra_headers: Headers | None = None,
|
|
208
|
+
extra_query: Query | None = None,
|
|
209
|
+
extra_body: Body | None = None,
|
|
210
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
211
|
+
) -> Identity:
|
|
212
|
+
"""
|
|
213
|
+
Modify Identity
|
|
214
|
+
|
|
215
|
+
Args:
|
|
216
|
+
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
217
|
+
|
|
218
|
+
agent_ids: The agent ids that are associated with the identity.
|
|
219
|
+
|
|
220
|
+
block_ids: The IDs of the blocks associated with the identity.
|
|
221
|
+
|
|
222
|
+
identifier_key: External, user-generated identifier key of the identity.
|
|
223
|
+
|
|
224
|
+
identity_type: Enum to represent the type of the identity.
|
|
225
|
+
|
|
226
|
+
name: The name of the identity.
|
|
227
|
+
|
|
228
|
+
properties: List of properties associated with the identity.
|
|
229
|
+
|
|
230
|
+
extra_headers: Send extra headers
|
|
231
|
+
|
|
232
|
+
extra_query: Add additional query parameters to the request
|
|
233
|
+
|
|
234
|
+
extra_body: Add additional JSON properties to the request
|
|
235
|
+
|
|
236
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
237
|
+
"""
|
|
238
|
+
if not identity_id:
|
|
239
|
+
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
240
|
+
return self._patch(
|
|
241
|
+
f"/v1/identities/{identity_id}",
|
|
242
|
+
body=maybe_transform(
|
|
243
|
+
{
|
|
244
|
+
"agent_ids": agent_ids,
|
|
245
|
+
"block_ids": block_ids,
|
|
246
|
+
"identifier_key": identifier_key,
|
|
247
|
+
"identity_type": identity_type,
|
|
248
|
+
"name": name,
|
|
249
|
+
"properties": properties,
|
|
250
|
+
},
|
|
251
|
+
identity_update_params.IdentityUpdateParams,
|
|
252
|
+
),
|
|
253
|
+
options=make_request_options(
|
|
254
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
255
|
+
),
|
|
256
|
+
cast_to=Identity,
|
|
257
|
+
)
|
|
258
|
+
|
|
161
259
|
def list(
|
|
162
260
|
self,
|
|
163
261
|
*,
|
|
@@ -244,6 +342,8 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
244
342
|
Delete an identity by its identifier key
|
|
245
343
|
|
|
246
344
|
Args:
|
|
345
|
+
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
346
|
+
|
|
247
347
|
extra_headers: Send extra headers
|
|
248
348
|
|
|
249
349
|
extra_query: Add additional query parameters to the request
|
|
@@ -281,144 +381,17 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
281
381
|
cast_to=int,
|
|
282
382
|
)
|
|
283
383
|
|
|
284
|
-
def
|
|
285
|
-
self,
|
|
286
|
-
identity_id: str,
|
|
287
|
-
*,
|
|
288
|
-
after: Optional[str] | Omit = omit,
|
|
289
|
-
before: Optional[str] | Omit = omit,
|
|
290
|
-
limit: Optional[int] | Omit = omit,
|
|
291
|
-
order: Literal["asc", "desc"] | Omit = omit,
|
|
292
|
-
order_by: Literal["created_at"] | Omit = omit,
|
|
293
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
294
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
295
|
-
extra_headers: Headers | None = None,
|
|
296
|
-
extra_query: Query | None = None,
|
|
297
|
-
extra_body: Body | None = None,
|
|
298
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
299
|
-
) -> IdentityListAgentsResponse:
|
|
300
|
-
"""
|
|
301
|
-
Get all agents associated with the specified identity.
|
|
302
|
-
|
|
303
|
-
Args:
|
|
304
|
-
after: Agent ID cursor for pagination. Returns agents that come after this agent ID in
|
|
305
|
-
the specified sort order
|
|
306
|
-
|
|
307
|
-
before: Agent ID cursor for pagination. Returns agents that come before this agent ID in
|
|
308
|
-
the specified sort order
|
|
309
|
-
|
|
310
|
-
limit: Maximum number of agents to return
|
|
311
|
-
|
|
312
|
-
order: Sort order for agents by creation time. 'asc' for oldest first, 'desc' for
|
|
313
|
-
newest first
|
|
314
|
-
|
|
315
|
-
order_by: Field to sort by
|
|
316
|
-
|
|
317
|
-
extra_headers: Send extra headers
|
|
318
|
-
|
|
319
|
-
extra_query: Add additional query parameters to the request
|
|
320
|
-
|
|
321
|
-
extra_body: Add additional JSON properties to the request
|
|
322
|
-
|
|
323
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
324
|
-
"""
|
|
325
|
-
if not identity_id:
|
|
326
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
327
|
-
return self._get(
|
|
328
|
-
f"/v1/identities/{identity_id}/agents",
|
|
329
|
-
options=make_request_options(
|
|
330
|
-
extra_headers=extra_headers,
|
|
331
|
-
extra_query=extra_query,
|
|
332
|
-
extra_body=extra_body,
|
|
333
|
-
timeout=timeout,
|
|
334
|
-
query=maybe_transform(
|
|
335
|
-
{
|
|
336
|
-
"after": after,
|
|
337
|
-
"before": before,
|
|
338
|
-
"limit": limit,
|
|
339
|
-
"order": order,
|
|
340
|
-
"order_by": order_by,
|
|
341
|
-
},
|
|
342
|
-
identity_list_agents_params.IdentityListAgentsParams,
|
|
343
|
-
),
|
|
344
|
-
),
|
|
345
|
-
cast_to=IdentityListAgentsResponse,
|
|
346
|
-
)
|
|
347
|
-
|
|
348
|
-
def list_blocks(
|
|
349
|
-
self,
|
|
350
|
-
identity_id: str,
|
|
351
|
-
*,
|
|
352
|
-
after: Optional[str] | Omit = omit,
|
|
353
|
-
before: Optional[str] | Omit = omit,
|
|
354
|
-
limit: Optional[int] | Omit = omit,
|
|
355
|
-
order: Literal["asc", "desc"] | Omit = omit,
|
|
356
|
-
order_by: Literal["created_at"] | Omit = omit,
|
|
357
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
358
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
359
|
-
extra_headers: Headers | None = None,
|
|
360
|
-
extra_query: Query | None = None,
|
|
361
|
-
extra_body: Body | None = None,
|
|
362
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
363
|
-
) -> IdentityListBlocksResponse:
|
|
364
|
-
"""
|
|
365
|
-
Get all blocks associated with the specified identity.
|
|
366
|
-
|
|
367
|
-
Args:
|
|
368
|
-
after: Block ID cursor for pagination. Returns blocks that come after this block ID in
|
|
369
|
-
the specified sort order
|
|
370
|
-
|
|
371
|
-
before: Block ID cursor for pagination. Returns blocks that come before this block ID in
|
|
372
|
-
the specified sort order
|
|
373
|
-
|
|
374
|
-
limit: Maximum number of blocks to return
|
|
375
|
-
|
|
376
|
-
order: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for
|
|
377
|
-
newest first
|
|
378
|
-
|
|
379
|
-
order_by: Field to sort by
|
|
380
|
-
|
|
381
|
-
extra_headers: Send extra headers
|
|
382
|
-
|
|
383
|
-
extra_query: Add additional query parameters to the request
|
|
384
|
-
|
|
385
|
-
extra_body: Add additional JSON properties to the request
|
|
386
|
-
|
|
387
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
388
|
-
"""
|
|
389
|
-
if not identity_id:
|
|
390
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
391
|
-
return self._get(
|
|
392
|
-
f"/v1/identities/{identity_id}/blocks",
|
|
393
|
-
options=make_request_options(
|
|
394
|
-
extra_headers=extra_headers,
|
|
395
|
-
extra_query=extra_query,
|
|
396
|
-
extra_body=extra_body,
|
|
397
|
-
timeout=timeout,
|
|
398
|
-
query=maybe_transform(
|
|
399
|
-
{
|
|
400
|
-
"after": after,
|
|
401
|
-
"before": before,
|
|
402
|
-
"limit": limit,
|
|
403
|
-
"order": order,
|
|
404
|
-
"order_by": order_by,
|
|
405
|
-
},
|
|
406
|
-
identity_list_blocks_params.IdentityListBlocksParams,
|
|
407
|
-
),
|
|
408
|
-
),
|
|
409
|
-
cast_to=IdentityListBlocksResponse,
|
|
410
|
-
)
|
|
411
|
-
|
|
412
|
-
def modify(
|
|
384
|
+
def upsert(
|
|
413
385
|
self,
|
|
414
|
-
identity_id: str,
|
|
415
386
|
*,
|
|
387
|
+
identifier_key: str,
|
|
388
|
+
identity_type: IdentityType,
|
|
389
|
+
name: str,
|
|
416
390
|
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
417
391
|
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
418
|
-
|
|
419
|
-
identity_type: Optional[IdentityType] | Omit = omit,
|
|
420
|
-
name: Optional[str] | Omit = omit,
|
|
392
|
+
project_id: Optional[str] | Omit = omit,
|
|
421
393
|
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
394
|
+
x_project: str | Omit = omit,
|
|
422
395
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
423
396
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
424
397
|
extra_headers: Headers | None = None,
|
|
@@ -427,21 +400,25 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
427
400
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
428
401
|
) -> Identity:
|
|
429
402
|
"""
|
|
430
|
-
|
|
403
|
+
Upsert Identity
|
|
431
404
|
|
|
432
405
|
Args:
|
|
433
|
-
agent_ids: The agent ids that are associated with the identity.
|
|
434
|
-
|
|
435
|
-
block_ids: The IDs of the blocks associated with the identity.
|
|
436
|
-
|
|
437
406
|
identifier_key: External, user-generated identifier key of the identity.
|
|
438
407
|
|
|
439
|
-
identity_type:
|
|
408
|
+
identity_type: The type of the identity.
|
|
440
409
|
|
|
441
410
|
name: The name of the identity.
|
|
442
411
|
|
|
412
|
+
agent_ids: The agent ids that are associated with the identity.
|
|
413
|
+
|
|
414
|
+
block_ids: The IDs of the blocks associated with the identity.
|
|
415
|
+
|
|
416
|
+
project_id: The project id of the identity, if applicable.
|
|
417
|
+
|
|
443
418
|
properties: List of properties associated with the identity.
|
|
444
419
|
|
|
420
|
+
x_project: The project slug to associate with the identity (cloud only).
|
|
421
|
+
|
|
445
422
|
extra_headers: Send extra headers
|
|
446
423
|
|
|
447
424
|
extra_query: Add additional query parameters to the request
|
|
@@ -450,20 +427,20 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
450
427
|
|
|
451
428
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
452
429
|
"""
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
f"/v1/identities/{identity_id}",
|
|
430
|
+
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
431
|
+
return self._put(
|
|
432
|
+
"/v1/identities/",
|
|
457
433
|
body=maybe_transform(
|
|
458
434
|
{
|
|
459
|
-
"agent_ids": agent_ids,
|
|
460
|
-
"block_ids": block_ids,
|
|
461
435
|
"identifier_key": identifier_key,
|
|
462
436
|
"identity_type": identity_type,
|
|
463
437
|
"name": name,
|
|
438
|
+
"agent_ids": agent_ids,
|
|
439
|
+
"block_ids": block_ids,
|
|
440
|
+
"project_id": project_id,
|
|
464
441
|
"properties": properties,
|
|
465
442
|
},
|
|
466
|
-
|
|
443
|
+
identity_upsert_params.IdentityUpsertParams,
|
|
467
444
|
),
|
|
468
445
|
options=make_request_options(
|
|
469
446
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
@@ -471,7 +448,40 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
471
448
|
cast_to=Identity,
|
|
472
449
|
)
|
|
473
450
|
|
|
474
|
-
|
|
451
|
+
|
|
452
|
+
class AsyncIdentitiesResource(AsyncAPIResource):
|
|
453
|
+
@cached_property
|
|
454
|
+
def properties(self) -> AsyncPropertiesResource:
|
|
455
|
+
return AsyncPropertiesResource(self._client)
|
|
456
|
+
|
|
457
|
+
@cached_property
|
|
458
|
+
def agents(self) -> AsyncAgentsResource:
|
|
459
|
+
return AsyncAgentsResource(self._client)
|
|
460
|
+
|
|
461
|
+
@cached_property
|
|
462
|
+
def blocks(self) -> AsyncBlocksResource:
|
|
463
|
+
return AsyncBlocksResource(self._client)
|
|
464
|
+
|
|
465
|
+
@cached_property
|
|
466
|
+
def with_raw_response(self) -> AsyncIdentitiesResourceWithRawResponse:
|
|
467
|
+
"""
|
|
468
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
469
|
+
the raw response object instead of the parsed content.
|
|
470
|
+
|
|
471
|
+
For more information, see https://www.github.com/letta-ai/letta-python#accessing-raw-response-data-eg-headers
|
|
472
|
+
"""
|
|
473
|
+
return AsyncIdentitiesResourceWithRawResponse(self)
|
|
474
|
+
|
|
475
|
+
@cached_property
|
|
476
|
+
def with_streaming_response(self) -> AsyncIdentitiesResourceWithStreamingResponse:
|
|
477
|
+
"""
|
|
478
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
479
|
+
|
|
480
|
+
For more information, see https://www.github.com/letta-ai/letta-python#with_streaming_response
|
|
481
|
+
"""
|
|
482
|
+
return AsyncIdentitiesResourceWithStreamingResponse(self)
|
|
483
|
+
|
|
484
|
+
async def create(
|
|
475
485
|
self,
|
|
476
486
|
*,
|
|
477
487
|
identifier_key: str,
|
|
@@ -490,7 +500,7 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
490
500
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
491
501
|
) -> Identity:
|
|
492
502
|
"""
|
|
493
|
-
|
|
503
|
+
Create Identity
|
|
494
504
|
|
|
495
505
|
Args:
|
|
496
506
|
identifier_key: External, user-generated identifier key of the identity.
|
|
@@ -518,9 +528,9 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
518
528
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
519
529
|
"""
|
|
520
530
|
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
521
|
-
return self.
|
|
531
|
+
return await self._post(
|
|
522
532
|
"/v1/identities/",
|
|
523
|
-
body=
|
|
533
|
+
body=await async_maybe_transform(
|
|
524
534
|
{
|
|
525
535
|
"identifier_key": identifier_key,
|
|
526
536
|
"identity_type": identity_type,
|
|
@@ -530,7 +540,7 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
530
540
|
"project_id": project_id,
|
|
531
541
|
"properties": properties,
|
|
532
542
|
},
|
|
533
|
-
|
|
543
|
+
identity_create_params.IdentityCreateParams,
|
|
534
544
|
),
|
|
535
545
|
options=make_request_options(
|
|
536
546
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
@@ -538,22 +548,23 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
538
548
|
cast_to=Identity,
|
|
539
549
|
)
|
|
540
550
|
|
|
541
|
-
def
|
|
551
|
+
async def retrieve(
|
|
542
552
|
self,
|
|
543
553
|
identity_id: str,
|
|
544
554
|
*,
|
|
545
|
-
body: Iterable[IdentityPropertyParam],
|
|
546
555
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
547
556
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
548
557
|
extra_headers: Headers | None = None,
|
|
549
558
|
extra_query: Query | None = None,
|
|
550
559
|
extra_body: Body | None = None,
|
|
551
560
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
552
|
-
) ->
|
|
561
|
+
) -> Identity:
|
|
553
562
|
"""
|
|
554
|
-
|
|
563
|
+
Retrieve Identity
|
|
555
564
|
|
|
556
565
|
Args:
|
|
566
|
+
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
567
|
+
|
|
557
568
|
extra_headers: Send extra headers
|
|
558
569
|
|
|
559
570
|
extra_query: Add additional query parameters to the request
|
|
@@ -564,47 +575,24 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
564
575
|
"""
|
|
565
576
|
if not identity_id:
|
|
566
577
|
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
567
|
-
return self.
|
|
568
|
-
f"/v1/identities/{identity_id}
|
|
569
|
-
body=maybe_transform(body, Iterable[IdentityPropertyParam]),
|
|
578
|
+
return await self._get(
|
|
579
|
+
f"/v1/identities/{identity_id}",
|
|
570
580
|
options=make_request_options(
|
|
571
581
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
572
582
|
),
|
|
573
|
-
cast_to=
|
|
583
|
+
cast_to=Identity,
|
|
574
584
|
)
|
|
575
585
|
|
|
576
|
-
|
|
577
|
-
class AsyncIdentitiesResource(AsyncAPIResource):
|
|
578
|
-
@cached_property
|
|
579
|
-
def with_raw_response(self) -> AsyncIdentitiesResourceWithRawResponse:
|
|
580
|
-
"""
|
|
581
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
582
|
-
the raw response object instead of the parsed content.
|
|
583
|
-
|
|
584
|
-
For more information, see https://www.github.com/letta-ai/letta-python#accessing-raw-response-data-eg-headers
|
|
585
|
-
"""
|
|
586
|
-
return AsyncIdentitiesResourceWithRawResponse(self)
|
|
587
|
-
|
|
588
|
-
@cached_property
|
|
589
|
-
def with_streaming_response(self) -> AsyncIdentitiesResourceWithStreamingResponse:
|
|
590
|
-
"""
|
|
591
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
592
|
-
|
|
593
|
-
For more information, see https://www.github.com/letta-ai/letta-python#with_streaming_response
|
|
594
|
-
"""
|
|
595
|
-
return AsyncIdentitiesResourceWithStreamingResponse(self)
|
|
596
|
-
|
|
597
|
-
async def create(
|
|
586
|
+
async def update(
|
|
598
587
|
self,
|
|
588
|
+
identity_id: str,
|
|
599
589
|
*,
|
|
600
|
-
identifier_key: str,
|
|
601
|
-
identity_type: IdentityType,
|
|
602
|
-
name: str,
|
|
603
590
|
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
604
591
|
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
605
|
-
|
|
592
|
+
identifier_key: Optional[str] | Omit = omit,
|
|
593
|
+
identity_type: Optional[IdentityType] | Omit = omit,
|
|
594
|
+
name: Optional[str] | Omit = omit,
|
|
606
595
|
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
607
|
-
x_project: str | Omit = omit,
|
|
608
596
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
609
597
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
610
598
|
extra_headers: Headers | None = None,
|
|
@@ -613,24 +601,22 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
613
601
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
614
602
|
) -> Identity:
|
|
615
603
|
"""
|
|
616
|
-
|
|
604
|
+
Modify Identity
|
|
617
605
|
|
|
618
606
|
Args:
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
identity_type: The type of the identity.
|
|
622
|
-
|
|
623
|
-
name: The name of the identity.
|
|
607
|
+
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
624
608
|
|
|
625
609
|
agent_ids: The agent ids that are associated with the identity.
|
|
626
610
|
|
|
627
611
|
block_ids: The IDs of the blocks associated with the identity.
|
|
628
612
|
|
|
629
|
-
|
|
613
|
+
identifier_key: External, user-generated identifier key of the identity.
|
|
630
614
|
|
|
631
|
-
|
|
615
|
+
identity_type: Enum to represent the type of the identity.
|
|
632
616
|
|
|
633
|
-
|
|
617
|
+
name: The name of the identity.
|
|
618
|
+
|
|
619
|
+
properties: List of properties associated with the identity.
|
|
634
620
|
|
|
635
621
|
extra_headers: Send extra headers
|
|
636
622
|
|
|
@@ -640,20 +626,20 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
640
626
|
|
|
641
627
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
642
628
|
"""
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
629
|
+
if not identity_id:
|
|
630
|
+
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
631
|
+
return await self._patch(
|
|
632
|
+
f"/v1/identities/{identity_id}",
|
|
646
633
|
body=await async_maybe_transform(
|
|
647
634
|
{
|
|
635
|
+
"agent_ids": agent_ids,
|
|
636
|
+
"block_ids": block_ids,
|
|
648
637
|
"identifier_key": identifier_key,
|
|
649
638
|
"identity_type": identity_type,
|
|
650
639
|
"name": name,
|
|
651
|
-
"agent_ids": agent_ids,
|
|
652
|
-
"block_ids": block_ids,
|
|
653
|
-
"project_id": project_id,
|
|
654
640
|
"properties": properties,
|
|
655
641
|
},
|
|
656
|
-
|
|
642
|
+
identity_update_params.IdentityUpdateParams,
|
|
657
643
|
),
|
|
658
644
|
options=make_request_options(
|
|
659
645
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
@@ -661,39 +647,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
661
647
|
cast_to=Identity,
|
|
662
648
|
)
|
|
663
649
|
|
|
664
|
-
async def retrieve(
|
|
665
|
-
self,
|
|
666
|
-
identity_id: str,
|
|
667
|
-
*,
|
|
668
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
669
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
670
|
-
extra_headers: Headers | None = None,
|
|
671
|
-
extra_query: Query | None = None,
|
|
672
|
-
extra_body: Body | None = None,
|
|
673
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
674
|
-
) -> Identity:
|
|
675
|
-
"""
|
|
676
|
-
Retrieve Identity
|
|
677
|
-
|
|
678
|
-
Args:
|
|
679
|
-
extra_headers: Send extra headers
|
|
680
|
-
|
|
681
|
-
extra_query: Add additional query parameters to the request
|
|
682
|
-
|
|
683
|
-
extra_body: Add additional JSON properties to the request
|
|
684
|
-
|
|
685
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
686
|
-
"""
|
|
687
|
-
if not identity_id:
|
|
688
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
689
|
-
return await self._get(
|
|
690
|
-
f"/v1/identities/{identity_id}",
|
|
691
|
-
options=make_request_options(
|
|
692
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
693
|
-
),
|
|
694
|
-
cast_to=Identity,
|
|
695
|
-
)
|
|
696
|
-
|
|
697
650
|
async def list(
|
|
698
651
|
self,
|
|
699
652
|
*,
|
|
@@ -780,6 +733,8 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
780
733
|
Delete an identity by its identifier key
|
|
781
734
|
|
|
782
735
|
Args:
|
|
736
|
+
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
737
|
+
|
|
783
738
|
extra_headers: Send extra headers
|
|
784
739
|
|
|
785
740
|
extra_query: Add additional query parameters to the request
|
|
@@ -817,196 +772,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
817
772
|
cast_to=int,
|
|
818
773
|
)
|
|
819
774
|
|
|
820
|
-
async def list_agents(
|
|
821
|
-
self,
|
|
822
|
-
identity_id: str,
|
|
823
|
-
*,
|
|
824
|
-
after: Optional[str] | Omit = omit,
|
|
825
|
-
before: Optional[str] | Omit = omit,
|
|
826
|
-
limit: Optional[int] | Omit = omit,
|
|
827
|
-
order: Literal["asc", "desc"] | Omit = omit,
|
|
828
|
-
order_by: Literal["created_at"] | Omit = omit,
|
|
829
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
830
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
831
|
-
extra_headers: Headers | None = None,
|
|
832
|
-
extra_query: Query | None = None,
|
|
833
|
-
extra_body: Body | None = None,
|
|
834
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
835
|
-
) -> IdentityListAgentsResponse:
|
|
836
|
-
"""
|
|
837
|
-
Get all agents associated with the specified identity.
|
|
838
|
-
|
|
839
|
-
Args:
|
|
840
|
-
after: Agent ID cursor for pagination. Returns agents that come after this agent ID in
|
|
841
|
-
the specified sort order
|
|
842
|
-
|
|
843
|
-
before: Agent ID cursor for pagination. Returns agents that come before this agent ID in
|
|
844
|
-
the specified sort order
|
|
845
|
-
|
|
846
|
-
limit: Maximum number of agents to return
|
|
847
|
-
|
|
848
|
-
order: Sort order for agents by creation time. 'asc' for oldest first, 'desc' for
|
|
849
|
-
newest first
|
|
850
|
-
|
|
851
|
-
order_by: Field to sort by
|
|
852
|
-
|
|
853
|
-
extra_headers: Send extra headers
|
|
854
|
-
|
|
855
|
-
extra_query: Add additional query parameters to the request
|
|
856
|
-
|
|
857
|
-
extra_body: Add additional JSON properties to the request
|
|
858
|
-
|
|
859
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
860
|
-
"""
|
|
861
|
-
if not identity_id:
|
|
862
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
863
|
-
return await self._get(
|
|
864
|
-
f"/v1/identities/{identity_id}/agents",
|
|
865
|
-
options=make_request_options(
|
|
866
|
-
extra_headers=extra_headers,
|
|
867
|
-
extra_query=extra_query,
|
|
868
|
-
extra_body=extra_body,
|
|
869
|
-
timeout=timeout,
|
|
870
|
-
query=await async_maybe_transform(
|
|
871
|
-
{
|
|
872
|
-
"after": after,
|
|
873
|
-
"before": before,
|
|
874
|
-
"limit": limit,
|
|
875
|
-
"order": order,
|
|
876
|
-
"order_by": order_by,
|
|
877
|
-
},
|
|
878
|
-
identity_list_agents_params.IdentityListAgentsParams,
|
|
879
|
-
),
|
|
880
|
-
),
|
|
881
|
-
cast_to=IdentityListAgentsResponse,
|
|
882
|
-
)
|
|
883
|
-
|
|
884
|
-
async def list_blocks(
|
|
885
|
-
self,
|
|
886
|
-
identity_id: str,
|
|
887
|
-
*,
|
|
888
|
-
after: Optional[str] | Omit = omit,
|
|
889
|
-
before: Optional[str] | Omit = omit,
|
|
890
|
-
limit: Optional[int] | Omit = omit,
|
|
891
|
-
order: Literal["asc", "desc"] | Omit = omit,
|
|
892
|
-
order_by: Literal["created_at"] | Omit = omit,
|
|
893
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
894
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
895
|
-
extra_headers: Headers | None = None,
|
|
896
|
-
extra_query: Query | None = None,
|
|
897
|
-
extra_body: Body | None = None,
|
|
898
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
899
|
-
) -> IdentityListBlocksResponse:
|
|
900
|
-
"""
|
|
901
|
-
Get all blocks associated with the specified identity.
|
|
902
|
-
|
|
903
|
-
Args:
|
|
904
|
-
after: Block ID cursor for pagination. Returns blocks that come after this block ID in
|
|
905
|
-
the specified sort order
|
|
906
|
-
|
|
907
|
-
before: Block ID cursor for pagination. Returns blocks that come before this block ID in
|
|
908
|
-
the specified sort order
|
|
909
|
-
|
|
910
|
-
limit: Maximum number of blocks to return
|
|
911
|
-
|
|
912
|
-
order: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for
|
|
913
|
-
newest first
|
|
914
|
-
|
|
915
|
-
order_by: Field to sort by
|
|
916
|
-
|
|
917
|
-
extra_headers: Send extra headers
|
|
918
|
-
|
|
919
|
-
extra_query: Add additional query parameters to the request
|
|
920
|
-
|
|
921
|
-
extra_body: Add additional JSON properties to the request
|
|
922
|
-
|
|
923
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
924
|
-
"""
|
|
925
|
-
if not identity_id:
|
|
926
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
927
|
-
return await self._get(
|
|
928
|
-
f"/v1/identities/{identity_id}/blocks",
|
|
929
|
-
options=make_request_options(
|
|
930
|
-
extra_headers=extra_headers,
|
|
931
|
-
extra_query=extra_query,
|
|
932
|
-
extra_body=extra_body,
|
|
933
|
-
timeout=timeout,
|
|
934
|
-
query=await async_maybe_transform(
|
|
935
|
-
{
|
|
936
|
-
"after": after,
|
|
937
|
-
"before": before,
|
|
938
|
-
"limit": limit,
|
|
939
|
-
"order": order,
|
|
940
|
-
"order_by": order_by,
|
|
941
|
-
},
|
|
942
|
-
identity_list_blocks_params.IdentityListBlocksParams,
|
|
943
|
-
),
|
|
944
|
-
),
|
|
945
|
-
cast_to=IdentityListBlocksResponse,
|
|
946
|
-
)
|
|
947
|
-
|
|
948
|
-
async def modify(
|
|
949
|
-
self,
|
|
950
|
-
identity_id: str,
|
|
951
|
-
*,
|
|
952
|
-
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
953
|
-
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
954
|
-
identifier_key: Optional[str] | Omit = omit,
|
|
955
|
-
identity_type: Optional[IdentityType] | Omit = omit,
|
|
956
|
-
name: Optional[str] | Omit = omit,
|
|
957
|
-
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
958
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
959
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
960
|
-
extra_headers: Headers | None = None,
|
|
961
|
-
extra_query: Query | None = None,
|
|
962
|
-
extra_body: Body | None = None,
|
|
963
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
964
|
-
) -> Identity:
|
|
965
|
-
"""
|
|
966
|
-
Modify Identity
|
|
967
|
-
|
|
968
|
-
Args:
|
|
969
|
-
agent_ids: The agent ids that are associated with the identity.
|
|
970
|
-
|
|
971
|
-
block_ids: The IDs of the blocks associated with the identity.
|
|
972
|
-
|
|
973
|
-
identifier_key: External, user-generated identifier key of the identity.
|
|
974
|
-
|
|
975
|
-
identity_type: Enum to represent the type of the identity.
|
|
976
|
-
|
|
977
|
-
name: The name of the identity.
|
|
978
|
-
|
|
979
|
-
properties: List of properties associated with the identity.
|
|
980
|
-
|
|
981
|
-
extra_headers: Send extra headers
|
|
982
|
-
|
|
983
|
-
extra_query: Add additional query parameters to the request
|
|
984
|
-
|
|
985
|
-
extra_body: Add additional JSON properties to the request
|
|
986
|
-
|
|
987
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
988
|
-
"""
|
|
989
|
-
if not identity_id:
|
|
990
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
991
|
-
return await self._patch(
|
|
992
|
-
f"/v1/identities/{identity_id}",
|
|
993
|
-
body=await async_maybe_transform(
|
|
994
|
-
{
|
|
995
|
-
"agent_ids": agent_ids,
|
|
996
|
-
"block_ids": block_ids,
|
|
997
|
-
"identifier_key": identifier_key,
|
|
998
|
-
"identity_type": identity_type,
|
|
999
|
-
"name": name,
|
|
1000
|
-
"properties": properties,
|
|
1001
|
-
},
|
|
1002
|
-
identity_modify_params.IdentityModifyParams,
|
|
1003
|
-
),
|
|
1004
|
-
options=make_request_options(
|
|
1005
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1006
|
-
),
|
|
1007
|
-
cast_to=Identity,
|
|
1008
|
-
)
|
|
1009
|
-
|
|
1010
775
|
async def upsert(
|
|
1011
776
|
self,
|
|
1012
777
|
*,
|
|
@@ -1074,41 +839,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
1074
839
|
cast_to=Identity,
|
|
1075
840
|
)
|
|
1076
841
|
|
|
1077
|
-
async def upsert_properties(
|
|
1078
|
-
self,
|
|
1079
|
-
identity_id: str,
|
|
1080
|
-
*,
|
|
1081
|
-
body: Iterable[IdentityPropertyParam],
|
|
1082
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1083
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1084
|
-
extra_headers: Headers | None = None,
|
|
1085
|
-
extra_query: Query | None = None,
|
|
1086
|
-
extra_body: Body | None = None,
|
|
1087
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1088
|
-
) -> object:
|
|
1089
|
-
"""
|
|
1090
|
-
Upsert Identity Properties
|
|
1091
|
-
|
|
1092
|
-
Args:
|
|
1093
|
-
extra_headers: Send extra headers
|
|
1094
|
-
|
|
1095
|
-
extra_query: Add additional query parameters to the request
|
|
1096
|
-
|
|
1097
|
-
extra_body: Add additional JSON properties to the request
|
|
1098
|
-
|
|
1099
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1100
|
-
"""
|
|
1101
|
-
if not identity_id:
|
|
1102
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
1103
|
-
return await self._put(
|
|
1104
|
-
f"/v1/identities/{identity_id}/properties",
|
|
1105
|
-
body=await async_maybe_transform(body, Iterable[IdentityPropertyParam]),
|
|
1106
|
-
options=make_request_options(
|
|
1107
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1108
|
-
),
|
|
1109
|
-
cast_to=object,
|
|
1110
|
-
)
|
|
1111
|
-
|
|
1112
842
|
|
|
1113
843
|
class IdentitiesResourceWithRawResponse:
|
|
1114
844
|
def __init__(self, identities: IdentitiesResource) -> None:
|
|
@@ -1120,6 +850,9 @@ class IdentitiesResourceWithRawResponse:
|
|
|
1120
850
|
self.retrieve = to_raw_response_wrapper(
|
|
1121
851
|
identities.retrieve,
|
|
1122
852
|
)
|
|
853
|
+
self.update = to_raw_response_wrapper(
|
|
854
|
+
identities.update,
|
|
855
|
+
)
|
|
1123
856
|
self.list = to_raw_response_wrapper(
|
|
1124
857
|
identities.list,
|
|
1125
858
|
)
|
|
@@ -1129,21 +862,21 @@ class IdentitiesResourceWithRawResponse:
|
|
|
1129
862
|
self.count = to_raw_response_wrapper(
|
|
1130
863
|
identities.count,
|
|
1131
864
|
)
|
|
1132
|
-
self.list_agents = to_raw_response_wrapper(
|
|
1133
|
-
identities.list_agents,
|
|
1134
|
-
)
|
|
1135
|
-
self.list_blocks = to_raw_response_wrapper(
|
|
1136
|
-
identities.list_blocks,
|
|
1137
|
-
)
|
|
1138
|
-
self.modify = to_raw_response_wrapper(
|
|
1139
|
-
identities.modify,
|
|
1140
|
-
)
|
|
1141
865
|
self.upsert = to_raw_response_wrapper(
|
|
1142
866
|
identities.upsert,
|
|
1143
867
|
)
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
868
|
+
|
|
869
|
+
@cached_property
|
|
870
|
+
def properties(self) -> PropertiesResourceWithRawResponse:
|
|
871
|
+
return PropertiesResourceWithRawResponse(self._identities.properties)
|
|
872
|
+
|
|
873
|
+
@cached_property
|
|
874
|
+
def agents(self) -> AgentsResourceWithRawResponse:
|
|
875
|
+
return AgentsResourceWithRawResponse(self._identities.agents)
|
|
876
|
+
|
|
877
|
+
@cached_property
|
|
878
|
+
def blocks(self) -> BlocksResourceWithRawResponse:
|
|
879
|
+
return BlocksResourceWithRawResponse(self._identities.blocks)
|
|
1147
880
|
|
|
1148
881
|
|
|
1149
882
|
class AsyncIdentitiesResourceWithRawResponse:
|
|
@@ -1156,6 +889,9 @@ class AsyncIdentitiesResourceWithRawResponse:
|
|
|
1156
889
|
self.retrieve = async_to_raw_response_wrapper(
|
|
1157
890
|
identities.retrieve,
|
|
1158
891
|
)
|
|
892
|
+
self.update = async_to_raw_response_wrapper(
|
|
893
|
+
identities.update,
|
|
894
|
+
)
|
|
1159
895
|
self.list = async_to_raw_response_wrapper(
|
|
1160
896
|
identities.list,
|
|
1161
897
|
)
|
|
@@ -1165,21 +901,21 @@ class AsyncIdentitiesResourceWithRawResponse:
|
|
|
1165
901
|
self.count = async_to_raw_response_wrapper(
|
|
1166
902
|
identities.count,
|
|
1167
903
|
)
|
|
1168
|
-
self.list_agents = async_to_raw_response_wrapper(
|
|
1169
|
-
identities.list_agents,
|
|
1170
|
-
)
|
|
1171
|
-
self.list_blocks = async_to_raw_response_wrapper(
|
|
1172
|
-
identities.list_blocks,
|
|
1173
|
-
)
|
|
1174
|
-
self.modify = async_to_raw_response_wrapper(
|
|
1175
|
-
identities.modify,
|
|
1176
|
-
)
|
|
1177
904
|
self.upsert = async_to_raw_response_wrapper(
|
|
1178
905
|
identities.upsert,
|
|
1179
906
|
)
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
907
|
+
|
|
908
|
+
@cached_property
|
|
909
|
+
def properties(self) -> AsyncPropertiesResourceWithRawResponse:
|
|
910
|
+
return AsyncPropertiesResourceWithRawResponse(self._identities.properties)
|
|
911
|
+
|
|
912
|
+
@cached_property
|
|
913
|
+
def agents(self) -> AsyncAgentsResourceWithRawResponse:
|
|
914
|
+
return AsyncAgentsResourceWithRawResponse(self._identities.agents)
|
|
915
|
+
|
|
916
|
+
@cached_property
|
|
917
|
+
def blocks(self) -> AsyncBlocksResourceWithRawResponse:
|
|
918
|
+
return AsyncBlocksResourceWithRawResponse(self._identities.blocks)
|
|
1183
919
|
|
|
1184
920
|
|
|
1185
921
|
class IdentitiesResourceWithStreamingResponse:
|
|
@@ -1192,6 +928,9 @@ class IdentitiesResourceWithStreamingResponse:
|
|
|
1192
928
|
self.retrieve = to_streamed_response_wrapper(
|
|
1193
929
|
identities.retrieve,
|
|
1194
930
|
)
|
|
931
|
+
self.update = to_streamed_response_wrapper(
|
|
932
|
+
identities.update,
|
|
933
|
+
)
|
|
1195
934
|
self.list = to_streamed_response_wrapper(
|
|
1196
935
|
identities.list,
|
|
1197
936
|
)
|
|
@@ -1201,21 +940,21 @@ class IdentitiesResourceWithStreamingResponse:
|
|
|
1201
940
|
self.count = to_streamed_response_wrapper(
|
|
1202
941
|
identities.count,
|
|
1203
942
|
)
|
|
1204
|
-
self.list_agents = to_streamed_response_wrapper(
|
|
1205
|
-
identities.list_agents,
|
|
1206
|
-
)
|
|
1207
|
-
self.list_blocks = to_streamed_response_wrapper(
|
|
1208
|
-
identities.list_blocks,
|
|
1209
|
-
)
|
|
1210
|
-
self.modify = to_streamed_response_wrapper(
|
|
1211
|
-
identities.modify,
|
|
1212
|
-
)
|
|
1213
943
|
self.upsert = to_streamed_response_wrapper(
|
|
1214
944
|
identities.upsert,
|
|
1215
945
|
)
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
946
|
+
|
|
947
|
+
@cached_property
|
|
948
|
+
def properties(self) -> PropertiesResourceWithStreamingResponse:
|
|
949
|
+
return PropertiesResourceWithStreamingResponse(self._identities.properties)
|
|
950
|
+
|
|
951
|
+
@cached_property
|
|
952
|
+
def agents(self) -> AgentsResourceWithStreamingResponse:
|
|
953
|
+
return AgentsResourceWithStreamingResponse(self._identities.agents)
|
|
954
|
+
|
|
955
|
+
@cached_property
|
|
956
|
+
def blocks(self) -> BlocksResourceWithStreamingResponse:
|
|
957
|
+
return BlocksResourceWithStreamingResponse(self._identities.blocks)
|
|
1219
958
|
|
|
1220
959
|
|
|
1221
960
|
class AsyncIdentitiesResourceWithStreamingResponse:
|
|
@@ -1228,6 +967,9 @@ class AsyncIdentitiesResourceWithStreamingResponse:
|
|
|
1228
967
|
self.retrieve = async_to_streamed_response_wrapper(
|
|
1229
968
|
identities.retrieve,
|
|
1230
969
|
)
|
|
970
|
+
self.update = async_to_streamed_response_wrapper(
|
|
971
|
+
identities.update,
|
|
972
|
+
)
|
|
1231
973
|
self.list = async_to_streamed_response_wrapper(
|
|
1232
974
|
identities.list,
|
|
1233
975
|
)
|
|
@@ -1237,18 +979,18 @@ class AsyncIdentitiesResourceWithStreamingResponse:
|
|
|
1237
979
|
self.count = async_to_streamed_response_wrapper(
|
|
1238
980
|
identities.count,
|
|
1239
981
|
)
|
|
1240
|
-
self.list_agents = async_to_streamed_response_wrapper(
|
|
1241
|
-
identities.list_agents,
|
|
1242
|
-
)
|
|
1243
|
-
self.list_blocks = async_to_streamed_response_wrapper(
|
|
1244
|
-
identities.list_blocks,
|
|
1245
|
-
)
|
|
1246
|
-
self.modify = async_to_streamed_response_wrapper(
|
|
1247
|
-
identities.modify,
|
|
1248
|
-
)
|
|
1249
982
|
self.upsert = async_to_streamed_response_wrapper(
|
|
1250
983
|
identities.upsert,
|
|
1251
984
|
)
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
985
|
+
|
|
986
|
+
@cached_property
|
|
987
|
+
def properties(self) -> AsyncPropertiesResourceWithStreamingResponse:
|
|
988
|
+
return AsyncPropertiesResourceWithStreamingResponse(self._identities.properties)
|
|
989
|
+
|
|
990
|
+
@cached_property
|
|
991
|
+
def agents(self) -> AsyncAgentsResourceWithStreamingResponse:
|
|
992
|
+
return AsyncAgentsResourceWithStreamingResponse(self._identities.agents)
|
|
993
|
+
|
|
994
|
+
@cached_property
|
|
995
|
+
def blocks(self) -> AsyncBlocksResourceWithStreamingResponse:
|
|
996
|
+
return AsyncBlocksResourceWithStreamingResponse(self._identities.blocks)
|