letta-client 1.0.0a6__py3-none-any.whl → 1.0.0a8__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_client/pagination.py +107 -0
- {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 +228 -744
- {letta_sdk/resources/agents/core_memory → letta_client/resources/agents}/blocks.py +112 -19
- {letta_sdk → letta_client}/resources/agents/files.py +71 -8
- {letta_sdk → letta_client}/resources/agents/folders.py +101 -11
- letta_client/resources/agents/groups.py +245 -0
- {letta_sdk → letta_client}/resources/agents/messages.py +265 -490
- {letta_sdk → letta_client}/resources/agents/tools.py +147 -31
- letta_sdk/resources/jobs.py → letta_client/resources/archives.py +268 -280
- {letta_sdk/resources/messages → letta_client/resources/batches}/batches.py +46 -161
- 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 +287 -0
- {letta_sdk/resources → letta_client/resources/blocks}/blocks.py +64 -175
- letta_client/resources/folders/__init__.py +47 -0
- letta_client/resources/folders/agents.py +237 -0
- letta_client/resources/folders/files.py +472 -0
- letta_sdk/resources/providers.py → letta_client/resources/folders/folders.py +298 -313
- {letta_sdk → letta_client}/resources/groups/groups.py +24 -88
- {letta_sdk → letta_client}/resources/groups/messages.py +178 -37
- letta_client/resources/identities/__init__.py +61 -0
- letta_client/resources/identities/agents.py +269 -0
- letta_client/resources/identities/blocks.py +237 -0
- {letta_sdk/resources → letta_client/resources/identities}/identities.py +277 -533
- 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 +189 -157
- letta_client/resources/runs/runs.py +462 -0
- letta_client/resources/runs/steps.py +229 -0
- 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 +237 -0
- letta_client/resources/steps/metrics.py +167 -0
- letta_client/resources/steps/steps.py +513 -0
- letta_sdk/resources/telemetry.py → letta_client/resources/steps/trace.py +45 -56
- {letta_sdk → letta_client}/resources/tags.py +13 -10
- 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 +249 -433
- letta_client/types/__init__.py +111 -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 +10 -21
- 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 +5 -5
- letta_client/types/agents/group_list_params.py +37 -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/types/tools → letta_client/types/blocks}/__init__.py +2 -0
- letta_sdk/types/block_list_agents_params.py → letta_client/types/blocks/agent_list_params.py +22 -5
- 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_client/types/folders/agent_list_response.py +7 -0
- letta_sdk/types/folder_list_files_params.py → letta_client/types/folders/file_list_params.py +2 -2
- letta_sdk/types/file_metadata.py → letta_client/types/folders/file_list_response.py +5 -5
- letta_sdk/types/source_upload_file_params.py → letta_client/types/folders/file_upload_params.py +5 -6
- letta_client/types/folders/file_upload_response.py +65 -0
- {letta_sdk → letta_client}/types/groups/__init__.py +1 -2
- {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 +7 -0
- letta_sdk/types/identity_list_agents_params.py → letta_client/types/identities/agent_list_params.py +19 -3
- letta_client/types/identities/block_list_params.py +34 -0
- 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 +8 -0
- letta_sdk/types/run_list_messages_params.py → letta_client/types/runs/message_list_params.py +5 -2
- 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/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 +32 -0
- letta_sdk/types/step_retrieve_metrics_response.py → letta_client/types/steps/metric_retrieve_response.py +6 -6
- {letta_sdk → letta_client}/types/tag_list_response.py +1 -2
- letta_client/types/templates/__init__.py +5 -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_list_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.0a8.dist-info}/METADATA +110 -70
- letta_client-1.0.0a8.dist-info/RECORD +289 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a8.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/projects.py +0 -189
- 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_list_groups_response.py +0 -10
- letta_sdk/types/agent_list_response.py +0 -10
- 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/block_list_response.py +0 -10
- 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/folder_list_response.py +0 -10
- 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_list_response.py +0 -10
- 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_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/block_list_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_list_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/group_list_response.py +0 -10
- letta_sdk/types/groups/message_list_response.py +0 -10
- letta_sdk/types/identity_list_agents_response.py +0 -10
- letta_sdk/types/identity_list_blocks_response.py +0 -10
- letta_sdk/types/identity_list_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/job_list_response.py +0 -10
- letta_sdk/types/messages/__init__.py +0 -10
- letta_sdk/types/messages/batch_job.py +0 -60
- letta_sdk/types/messages/batch_list_response.py +0 -10
- 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_active_response.py +0 -10
- letta_sdk/types/run_list_messages_response.py +0 -10
- letta_sdk/types/run_list_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/step_list_response.py +0 -10
- 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/tool_upsert_base_response.py +0 -10
- 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}/types/agent_count_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/assistant_message.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_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_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 → 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_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_update_params.py +0 -0
- {letta_sdk → letta_client}/types/groups/message_list_params.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_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/sleeptime_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/step_list_params.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/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_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.0a8.dist-info}/WHEEL +0 -0
|
@@ -17,11 +17,12 @@ from ..._response import (
|
|
|
17
17
|
async_to_raw_response_wrapper,
|
|
18
18
|
async_to_streamed_response_wrapper,
|
|
19
19
|
)
|
|
20
|
-
from ...
|
|
21
|
-
from ...
|
|
20
|
+
from ...pagination import SyncArrayPage, AsyncArrayPage
|
|
21
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
22
|
+
from ...types.groups import message_list_params, message_send_params, message_stream_params, message_update_params
|
|
22
23
|
from ...types.agents.message_type import MessageType
|
|
23
24
|
from ...types.agents.letta_response import LettaResponse
|
|
24
|
-
from ...types.
|
|
25
|
+
from ...types.agents.letta_message_union import LettaMessageUnion
|
|
25
26
|
from ...types.groups.message_update_response import MessageUpdateResponse
|
|
26
27
|
from ...types.agents.letta_user_message_content_union_param import LettaUserMessageContentUnionParam
|
|
27
28
|
from ...types.agents.letta_assistant_message_content_union_param import LettaAssistantMessageContentUnionParam
|
|
@@ -68,6 +69,10 @@ class MessagesResource(SyncAPIResource):
|
|
|
68
69
|
Update the details of a message associated with an agent.
|
|
69
70
|
|
|
70
71
|
Args:
|
|
72
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
73
|
+
|
|
74
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
75
|
+
|
|
71
76
|
content: The message content sent by the system (can be a string or an array of
|
|
72
77
|
multi-modal content parts)
|
|
73
78
|
|
|
@@ -100,6 +105,10 @@ class MessagesResource(SyncAPIResource):
|
|
|
100
105
|
Update the details of a message associated with an agent.
|
|
101
106
|
|
|
102
107
|
Args:
|
|
108
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
109
|
+
|
|
110
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
111
|
+
|
|
103
112
|
content: The message content sent by the user (can be a string or an array of multi-modal
|
|
104
113
|
content parts)
|
|
105
114
|
|
|
@@ -132,6 +141,10 @@ class MessagesResource(SyncAPIResource):
|
|
|
132
141
|
Update the details of a message associated with an agent.
|
|
133
142
|
|
|
134
143
|
Args:
|
|
144
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
145
|
+
|
|
146
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
147
|
+
|
|
135
148
|
extra_headers: Send extra headers
|
|
136
149
|
|
|
137
150
|
extra_query: Add additional query parameters to the request
|
|
@@ -161,6 +174,10 @@ class MessagesResource(SyncAPIResource):
|
|
|
161
174
|
Update the details of a message associated with an agent.
|
|
162
175
|
|
|
163
176
|
Args:
|
|
177
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
178
|
+
|
|
179
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
180
|
+
|
|
164
181
|
content: The message content sent by the assistant (can be a string or an array of
|
|
165
182
|
content parts)
|
|
166
183
|
|
|
@@ -237,11 +254,13 @@ class MessagesResource(SyncAPIResource):
|
|
|
237
254
|
extra_query: Query | None = None,
|
|
238
255
|
extra_body: Body | None = None,
|
|
239
256
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
240
|
-
) ->
|
|
257
|
+
) -> SyncArrayPage[LettaMessageUnion]:
|
|
241
258
|
"""
|
|
242
259
|
Retrieve message history for an agent.
|
|
243
260
|
|
|
244
261
|
Args:
|
|
262
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
263
|
+
|
|
245
264
|
after: Message ID cursor for pagination. Returns messages that come after this message
|
|
246
265
|
ID in the specified sort order
|
|
247
266
|
|
|
@@ -271,8 +290,9 @@ class MessagesResource(SyncAPIResource):
|
|
|
271
290
|
"""
|
|
272
291
|
if not group_id:
|
|
273
292
|
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
274
|
-
return self.
|
|
293
|
+
return self._get_api_list(
|
|
275
294
|
f"/v1/groups/{group_id}/messages",
|
|
295
|
+
page=SyncArrayPage[LettaMessageUnion],
|
|
276
296
|
options=make_request_options(
|
|
277
297
|
extra_headers=extra_headers,
|
|
278
298
|
extra_query=extra_query,
|
|
@@ -292,7 +312,42 @@ class MessagesResource(SyncAPIResource):
|
|
|
292
312
|
message_list_params.MessageListParams,
|
|
293
313
|
),
|
|
294
314
|
),
|
|
295
|
-
|
|
315
|
+
model=cast(Any, LettaMessageUnion), # Union types cannot be passed in as arguments in the type system
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
def reset(
|
|
319
|
+
self,
|
|
320
|
+
group_id: str,
|
|
321
|
+
*,
|
|
322
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
323
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
324
|
+
extra_headers: Headers | None = None,
|
|
325
|
+
extra_query: Query | None = None,
|
|
326
|
+
extra_body: Body | None = None,
|
|
327
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
328
|
+
) -> object:
|
|
329
|
+
"""
|
|
330
|
+
Delete the group messages for all agents that are part of the multi-agent group.
|
|
331
|
+
|
|
332
|
+
Args:
|
|
333
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
334
|
+
|
|
335
|
+
extra_headers: Send extra headers
|
|
336
|
+
|
|
337
|
+
extra_query: Add additional query parameters to the request
|
|
338
|
+
|
|
339
|
+
extra_body: Add additional JSON properties to the request
|
|
340
|
+
|
|
341
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
342
|
+
"""
|
|
343
|
+
if not group_id:
|
|
344
|
+
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
345
|
+
return self._patch(
|
|
346
|
+
f"/v1/groups/{group_id}/reset-messages",
|
|
347
|
+
options=make_request_options(
|
|
348
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
349
|
+
),
|
|
350
|
+
cast_to=object,
|
|
296
351
|
)
|
|
297
352
|
|
|
298
353
|
def send(
|
|
@@ -320,11 +375,15 @@ class MessagesResource(SyncAPIResource):
|
|
|
320
375
|
on the specified pattern
|
|
321
376
|
|
|
322
377
|
Args:
|
|
378
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
379
|
+
|
|
323
380
|
messages: The messages to be sent to the agent.
|
|
324
381
|
|
|
325
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
382
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
383
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
326
384
|
|
|
327
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
385
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
386
|
+
but deprecated for letta_v1_agent onward.
|
|
328
387
|
|
|
329
388
|
enable_thinking: If set to True, enables reasoning before responses or tool calls from the agent.
|
|
330
389
|
|
|
@@ -334,7 +393,8 @@ class MessagesResource(SyncAPIResource):
|
|
|
334
393
|
max_steps: Maximum number of steps the agent should take to process the request.
|
|
335
394
|
|
|
336
395
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
337
|
-
`send_message`) as `AssistantMessage` objects.
|
|
396
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
397
|
+
types, but deprecated for letta_v1_agent onward.
|
|
338
398
|
|
|
339
399
|
extra_headers: Send extra headers
|
|
340
400
|
|
|
@@ -366,11 +426,11 @@ class MessagesResource(SyncAPIResource):
|
|
|
366
426
|
cast_to=LettaResponse,
|
|
367
427
|
)
|
|
368
428
|
|
|
369
|
-
def
|
|
429
|
+
def stream(
|
|
370
430
|
self,
|
|
371
431
|
group_id: str,
|
|
372
432
|
*,
|
|
373
|
-
messages: Iterable[
|
|
433
|
+
messages: Iterable[message_stream_params.Message],
|
|
374
434
|
assistant_message_tool_kwarg: str | Omit = omit,
|
|
375
435
|
assistant_message_tool_name: str | Omit = omit,
|
|
376
436
|
background: bool | Omit = omit,
|
|
@@ -395,11 +455,15 @@ class MessagesResource(SyncAPIResource):
|
|
|
395
455
|
the tokens if 'stream_tokens' is set to True.
|
|
396
456
|
|
|
397
457
|
Args:
|
|
458
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
459
|
+
|
|
398
460
|
messages: The messages to be sent to the agent.
|
|
399
461
|
|
|
400
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
462
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
463
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
401
464
|
|
|
402
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
465
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
466
|
+
but deprecated for letta_v1_agent onward.
|
|
403
467
|
|
|
404
468
|
background: Whether to process the request in the background.
|
|
405
469
|
|
|
@@ -417,7 +481,8 @@ class MessagesResource(SyncAPIResource):
|
|
|
417
481
|
per step.
|
|
418
482
|
|
|
419
483
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
420
|
-
`send_message`) as `AssistantMessage` objects.
|
|
484
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
485
|
+
types, but deprecated for letta_v1_agent onward.
|
|
421
486
|
|
|
422
487
|
extra_headers: Send extra headers
|
|
423
488
|
|
|
@@ -444,7 +509,7 @@ class MessagesResource(SyncAPIResource):
|
|
|
444
509
|
"stream_tokens": stream_tokens,
|
|
445
510
|
"use_assistant_message": use_assistant_message,
|
|
446
511
|
},
|
|
447
|
-
|
|
512
|
+
message_stream_params.MessageStreamParams,
|
|
448
513
|
),
|
|
449
514
|
options=make_request_options(
|
|
450
515
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
@@ -492,6 +557,10 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
492
557
|
Update the details of a message associated with an agent.
|
|
493
558
|
|
|
494
559
|
Args:
|
|
560
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
561
|
+
|
|
562
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
563
|
+
|
|
495
564
|
content: The message content sent by the system (can be a string or an array of
|
|
496
565
|
multi-modal content parts)
|
|
497
566
|
|
|
@@ -524,6 +593,10 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
524
593
|
Update the details of a message associated with an agent.
|
|
525
594
|
|
|
526
595
|
Args:
|
|
596
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
597
|
+
|
|
598
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
599
|
+
|
|
527
600
|
content: The message content sent by the user (can be a string or an array of multi-modal
|
|
528
601
|
content parts)
|
|
529
602
|
|
|
@@ -556,6 +629,10 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
556
629
|
Update the details of a message associated with an agent.
|
|
557
630
|
|
|
558
631
|
Args:
|
|
632
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
633
|
+
|
|
634
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
635
|
+
|
|
559
636
|
extra_headers: Send extra headers
|
|
560
637
|
|
|
561
638
|
extra_query: Add additional query parameters to the request
|
|
@@ -585,6 +662,10 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
585
662
|
Update the details of a message associated with an agent.
|
|
586
663
|
|
|
587
664
|
Args:
|
|
665
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
666
|
+
|
|
667
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
668
|
+
|
|
588
669
|
content: The message content sent by the assistant (can be a string or an array of
|
|
589
670
|
content parts)
|
|
590
671
|
|
|
@@ -643,7 +724,7 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
643
724
|
),
|
|
644
725
|
)
|
|
645
726
|
|
|
646
|
-
|
|
727
|
+
def list(
|
|
647
728
|
self,
|
|
648
729
|
group_id: str,
|
|
649
730
|
*,
|
|
@@ -661,11 +742,13 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
661
742
|
extra_query: Query | None = None,
|
|
662
743
|
extra_body: Body | None = None,
|
|
663
744
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
664
|
-
) ->
|
|
745
|
+
) -> AsyncPaginator[LettaMessageUnion, AsyncArrayPage[LettaMessageUnion]]:
|
|
665
746
|
"""
|
|
666
747
|
Retrieve message history for an agent.
|
|
667
748
|
|
|
668
749
|
Args:
|
|
750
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
751
|
+
|
|
669
752
|
after: Message ID cursor for pagination. Returns messages that come after this message
|
|
670
753
|
ID in the specified sort order
|
|
671
754
|
|
|
@@ -695,14 +778,15 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
695
778
|
"""
|
|
696
779
|
if not group_id:
|
|
697
780
|
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
698
|
-
return
|
|
781
|
+
return self._get_api_list(
|
|
699
782
|
f"/v1/groups/{group_id}/messages",
|
|
783
|
+
page=AsyncArrayPage[LettaMessageUnion],
|
|
700
784
|
options=make_request_options(
|
|
701
785
|
extra_headers=extra_headers,
|
|
702
786
|
extra_query=extra_query,
|
|
703
787
|
extra_body=extra_body,
|
|
704
788
|
timeout=timeout,
|
|
705
|
-
query=
|
|
789
|
+
query=maybe_transform(
|
|
706
790
|
{
|
|
707
791
|
"after": after,
|
|
708
792
|
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
@@ -716,7 +800,42 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
716
800
|
message_list_params.MessageListParams,
|
|
717
801
|
),
|
|
718
802
|
),
|
|
719
|
-
|
|
803
|
+
model=cast(Any, LettaMessageUnion), # Union types cannot be passed in as arguments in the type system
|
|
804
|
+
)
|
|
805
|
+
|
|
806
|
+
async def reset(
|
|
807
|
+
self,
|
|
808
|
+
group_id: str,
|
|
809
|
+
*,
|
|
810
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
811
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
812
|
+
extra_headers: Headers | None = None,
|
|
813
|
+
extra_query: Query | None = None,
|
|
814
|
+
extra_body: Body | None = None,
|
|
815
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
816
|
+
) -> object:
|
|
817
|
+
"""
|
|
818
|
+
Delete the group messages for all agents that are part of the multi-agent group.
|
|
819
|
+
|
|
820
|
+
Args:
|
|
821
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
822
|
+
|
|
823
|
+
extra_headers: Send extra headers
|
|
824
|
+
|
|
825
|
+
extra_query: Add additional query parameters to the request
|
|
826
|
+
|
|
827
|
+
extra_body: Add additional JSON properties to the request
|
|
828
|
+
|
|
829
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
830
|
+
"""
|
|
831
|
+
if not group_id:
|
|
832
|
+
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
833
|
+
return await self._patch(
|
|
834
|
+
f"/v1/groups/{group_id}/reset-messages",
|
|
835
|
+
options=make_request_options(
|
|
836
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
837
|
+
),
|
|
838
|
+
cast_to=object,
|
|
720
839
|
)
|
|
721
840
|
|
|
722
841
|
async def send(
|
|
@@ -744,11 +863,15 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
744
863
|
on the specified pattern
|
|
745
864
|
|
|
746
865
|
Args:
|
|
866
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
867
|
+
|
|
747
868
|
messages: The messages to be sent to the agent.
|
|
748
869
|
|
|
749
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
870
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
871
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
750
872
|
|
|
751
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
873
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
874
|
+
but deprecated for letta_v1_agent onward.
|
|
752
875
|
|
|
753
876
|
enable_thinking: If set to True, enables reasoning before responses or tool calls from the agent.
|
|
754
877
|
|
|
@@ -758,7 +881,8 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
758
881
|
max_steps: Maximum number of steps the agent should take to process the request.
|
|
759
882
|
|
|
760
883
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
761
|
-
`send_message`) as `AssistantMessage` objects.
|
|
884
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
885
|
+
types, but deprecated for letta_v1_agent onward.
|
|
762
886
|
|
|
763
887
|
extra_headers: Send extra headers
|
|
764
888
|
|
|
@@ -790,11 +914,11 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
790
914
|
cast_to=LettaResponse,
|
|
791
915
|
)
|
|
792
916
|
|
|
793
|
-
async def
|
|
917
|
+
async def stream(
|
|
794
918
|
self,
|
|
795
919
|
group_id: str,
|
|
796
920
|
*,
|
|
797
|
-
messages: Iterable[
|
|
921
|
+
messages: Iterable[message_stream_params.Message],
|
|
798
922
|
assistant_message_tool_kwarg: str | Omit = omit,
|
|
799
923
|
assistant_message_tool_name: str | Omit = omit,
|
|
800
924
|
background: bool | Omit = omit,
|
|
@@ -819,11 +943,15 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
819
943
|
the tokens if 'stream_tokens' is set to True.
|
|
820
944
|
|
|
821
945
|
Args:
|
|
946
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
947
|
+
|
|
822
948
|
messages: The messages to be sent to the agent.
|
|
823
949
|
|
|
824
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
950
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
951
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
825
952
|
|
|
826
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
953
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
954
|
+
but deprecated for letta_v1_agent onward.
|
|
827
955
|
|
|
828
956
|
background: Whether to process the request in the background.
|
|
829
957
|
|
|
@@ -841,7 +969,8 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
841
969
|
per step.
|
|
842
970
|
|
|
843
971
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
844
|
-
`send_message`) as `AssistantMessage` objects.
|
|
972
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
973
|
+
types, but deprecated for letta_v1_agent onward.
|
|
845
974
|
|
|
846
975
|
extra_headers: Send extra headers
|
|
847
976
|
|
|
@@ -868,7 +997,7 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
868
997
|
"stream_tokens": stream_tokens,
|
|
869
998
|
"use_assistant_message": use_assistant_message,
|
|
870
999
|
},
|
|
871
|
-
|
|
1000
|
+
message_stream_params.MessageStreamParams,
|
|
872
1001
|
),
|
|
873
1002
|
options=make_request_options(
|
|
874
1003
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
@@ -887,11 +1016,14 @@ class MessagesResourceWithRawResponse:
|
|
|
887
1016
|
self.list = to_raw_response_wrapper(
|
|
888
1017
|
messages.list,
|
|
889
1018
|
)
|
|
1019
|
+
self.reset = to_raw_response_wrapper(
|
|
1020
|
+
messages.reset,
|
|
1021
|
+
)
|
|
890
1022
|
self.send = to_raw_response_wrapper(
|
|
891
1023
|
messages.send,
|
|
892
1024
|
)
|
|
893
|
-
self.
|
|
894
|
-
messages.
|
|
1025
|
+
self.stream = to_raw_response_wrapper(
|
|
1026
|
+
messages.stream,
|
|
895
1027
|
)
|
|
896
1028
|
|
|
897
1029
|
|
|
@@ -905,11 +1037,14 @@ class AsyncMessagesResourceWithRawResponse:
|
|
|
905
1037
|
self.list = async_to_raw_response_wrapper(
|
|
906
1038
|
messages.list,
|
|
907
1039
|
)
|
|
1040
|
+
self.reset = async_to_raw_response_wrapper(
|
|
1041
|
+
messages.reset,
|
|
1042
|
+
)
|
|
908
1043
|
self.send = async_to_raw_response_wrapper(
|
|
909
1044
|
messages.send,
|
|
910
1045
|
)
|
|
911
|
-
self.
|
|
912
|
-
messages.
|
|
1046
|
+
self.stream = async_to_raw_response_wrapper(
|
|
1047
|
+
messages.stream,
|
|
913
1048
|
)
|
|
914
1049
|
|
|
915
1050
|
|
|
@@ -923,11 +1058,14 @@ class MessagesResourceWithStreamingResponse:
|
|
|
923
1058
|
self.list = to_streamed_response_wrapper(
|
|
924
1059
|
messages.list,
|
|
925
1060
|
)
|
|
1061
|
+
self.reset = to_streamed_response_wrapper(
|
|
1062
|
+
messages.reset,
|
|
1063
|
+
)
|
|
926
1064
|
self.send = to_streamed_response_wrapper(
|
|
927
1065
|
messages.send,
|
|
928
1066
|
)
|
|
929
|
-
self.
|
|
930
|
-
messages.
|
|
1067
|
+
self.stream = to_streamed_response_wrapper(
|
|
1068
|
+
messages.stream,
|
|
931
1069
|
)
|
|
932
1070
|
|
|
933
1071
|
|
|
@@ -941,9 +1079,12 @@ class AsyncMessagesResourceWithStreamingResponse:
|
|
|
941
1079
|
self.list = async_to_streamed_response_wrapper(
|
|
942
1080
|
messages.list,
|
|
943
1081
|
)
|
|
1082
|
+
self.reset = async_to_streamed_response_wrapper(
|
|
1083
|
+
messages.reset,
|
|
1084
|
+
)
|
|
944
1085
|
self.send = async_to_streamed_response_wrapper(
|
|
945
1086
|
messages.send,
|
|
946
1087
|
)
|
|
947
|
-
self.
|
|
948
|
-
messages.
|
|
1088
|
+
self.stream = async_to_streamed_response_wrapper(
|
|
1089
|
+
messages.stream,
|
|
949
1090
|
)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .agents import (
|
|
4
|
+
AgentsResource,
|
|
5
|
+
AsyncAgentsResource,
|
|
6
|
+
AgentsResourceWithRawResponse,
|
|
7
|
+
AsyncAgentsResourceWithRawResponse,
|
|
8
|
+
AgentsResourceWithStreamingResponse,
|
|
9
|
+
AsyncAgentsResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .blocks import (
|
|
12
|
+
BlocksResource,
|
|
13
|
+
AsyncBlocksResource,
|
|
14
|
+
BlocksResourceWithRawResponse,
|
|
15
|
+
AsyncBlocksResourceWithRawResponse,
|
|
16
|
+
BlocksResourceWithStreamingResponse,
|
|
17
|
+
AsyncBlocksResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .identities import (
|
|
20
|
+
IdentitiesResource,
|
|
21
|
+
AsyncIdentitiesResource,
|
|
22
|
+
IdentitiesResourceWithRawResponse,
|
|
23
|
+
AsyncIdentitiesResourceWithRawResponse,
|
|
24
|
+
IdentitiesResourceWithStreamingResponse,
|
|
25
|
+
AsyncIdentitiesResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
from .properties import (
|
|
28
|
+
PropertiesResource,
|
|
29
|
+
AsyncPropertiesResource,
|
|
30
|
+
PropertiesResourceWithRawResponse,
|
|
31
|
+
AsyncPropertiesResourceWithRawResponse,
|
|
32
|
+
PropertiesResourceWithStreamingResponse,
|
|
33
|
+
AsyncPropertiesResourceWithStreamingResponse,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"PropertiesResource",
|
|
38
|
+
"AsyncPropertiesResource",
|
|
39
|
+
"PropertiesResourceWithRawResponse",
|
|
40
|
+
"AsyncPropertiesResourceWithRawResponse",
|
|
41
|
+
"PropertiesResourceWithStreamingResponse",
|
|
42
|
+
"AsyncPropertiesResourceWithStreamingResponse",
|
|
43
|
+
"AgentsResource",
|
|
44
|
+
"AsyncAgentsResource",
|
|
45
|
+
"AgentsResourceWithRawResponse",
|
|
46
|
+
"AsyncAgentsResourceWithRawResponse",
|
|
47
|
+
"AgentsResourceWithStreamingResponse",
|
|
48
|
+
"AsyncAgentsResourceWithStreamingResponse",
|
|
49
|
+
"BlocksResource",
|
|
50
|
+
"AsyncBlocksResource",
|
|
51
|
+
"BlocksResourceWithRawResponse",
|
|
52
|
+
"AsyncBlocksResourceWithRawResponse",
|
|
53
|
+
"BlocksResourceWithStreamingResponse",
|
|
54
|
+
"AsyncBlocksResourceWithStreamingResponse",
|
|
55
|
+
"IdentitiesResource",
|
|
56
|
+
"AsyncIdentitiesResource",
|
|
57
|
+
"IdentitiesResourceWithRawResponse",
|
|
58
|
+
"AsyncIdentitiesResourceWithRawResponse",
|
|
59
|
+
"IdentitiesResourceWithStreamingResponse",
|
|
60
|
+
"AsyncIdentitiesResourceWithStreamingResponse",
|
|
61
|
+
]
|