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
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Any, List, Union, Iterable, Optional, cast
|
|
6
|
-
from datetime import datetime
|
|
7
6
|
from typing_extensions import Literal, overload
|
|
8
7
|
|
|
9
8
|
import httpx
|
|
10
9
|
|
|
11
|
-
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
10
|
+
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
|
|
12
11
|
from ..._utils import required_args, maybe_transform, async_maybe_transform
|
|
13
12
|
from ..._compat import cached_property
|
|
14
13
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -18,26 +17,24 @@ from ..._response import (
|
|
|
18
17
|
async_to_raw_response_wrapper,
|
|
19
18
|
async_to_streamed_response_wrapper,
|
|
20
19
|
)
|
|
21
|
-
from ...
|
|
20
|
+
from ...pagination import SyncArrayPage, AsyncArrayPage
|
|
21
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
22
22
|
from ...types.agents import (
|
|
23
23
|
message_list_params,
|
|
24
24
|
message_send_params,
|
|
25
|
+
message_reset_params,
|
|
25
26
|
message_cancel_params,
|
|
26
|
-
|
|
27
|
+
message_stream_params,
|
|
27
28
|
message_update_params,
|
|
28
29
|
message_send_async_params,
|
|
29
|
-
message_send_stream_params,
|
|
30
|
-
message_preview_raw_payload_params,
|
|
31
30
|
)
|
|
32
31
|
from ...types.agents.run import Run
|
|
33
|
-
from ...types.
|
|
32
|
+
from ...types.agent_state import AgentState
|
|
34
33
|
from ...types.agents.message_type import MessageType
|
|
35
34
|
from ...types.agents.letta_response import LettaResponse
|
|
36
|
-
from ...types.agents.
|
|
35
|
+
from ...types.agents.letta_message_union import LettaMessageUnion
|
|
37
36
|
from ...types.agents.message_cancel_response import MessageCancelResponse
|
|
38
|
-
from ...types.agents.message_search_response import MessageSearchResponse
|
|
39
37
|
from ...types.agents.message_update_response import MessageUpdateResponse
|
|
40
|
-
from ...types.agents.message_preview_raw_payload_response import MessagePreviewRawPayloadResponse
|
|
41
38
|
from ...types.agents.letta_user_message_content_union_param import LettaUserMessageContentUnionParam
|
|
42
39
|
from ...types.agents.letta_assistant_message_content_union_param import LettaAssistantMessageContentUnionParam
|
|
43
40
|
|
|
@@ -83,6 +80,10 @@ class MessagesResource(SyncAPIResource):
|
|
|
83
80
|
Update the details of a message associated with an agent.
|
|
84
81
|
|
|
85
82
|
Args:
|
|
83
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
84
|
+
|
|
85
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
86
|
+
|
|
86
87
|
content: The message content sent by the system (can be a string or an array of
|
|
87
88
|
multi-modal content parts)
|
|
88
89
|
|
|
@@ -115,6 +116,10 @@ class MessagesResource(SyncAPIResource):
|
|
|
115
116
|
Update the details of a message associated with an agent.
|
|
116
117
|
|
|
117
118
|
Args:
|
|
119
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
120
|
+
|
|
121
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
122
|
+
|
|
118
123
|
content: The message content sent by the user (can be a string or an array of multi-modal
|
|
119
124
|
content parts)
|
|
120
125
|
|
|
@@ -147,6 +152,10 @@ class MessagesResource(SyncAPIResource):
|
|
|
147
152
|
Update the details of a message associated with an agent.
|
|
148
153
|
|
|
149
154
|
Args:
|
|
155
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
156
|
+
|
|
157
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
158
|
+
|
|
150
159
|
extra_headers: Send extra headers
|
|
151
160
|
|
|
152
161
|
extra_query: Add additional query parameters to the request
|
|
@@ -176,6 +185,10 @@ class MessagesResource(SyncAPIResource):
|
|
|
176
185
|
Update the details of a message associated with an agent.
|
|
177
186
|
|
|
178
187
|
Args:
|
|
188
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
189
|
+
|
|
190
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
191
|
+
|
|
179
192
|
content: The message content sent by the assistant (can be a string or an array of
|
|
180
193
|
content parts)
|
|
181
194
|
|
|
@@ -244,7 +257,9 @@ class MessagesResource(SyncAPIResource):
|
|
|
244
257
|
before: Optional[str] | Omit = omit,
|
|
245
258
|
group_id: Optional[str] | Omit = omit,
|
|
246
259
|
include_err: Optional[bool] | Omit = omit,
|
|
247
|
-
limit: int | Omit = omit,
|
|
260
|
+
limit: Optional[int] | Omit = omit,
|
|
261
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
262
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
248
263
|
use_assistant_message: bool | Omit = omit,
|
|
249
264
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
250
265
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -252,25 +267,34 @@ class MessagesResource(SyncAPIResource):
|
|
|
252
267
|
extra_query: Query | None = None,
|
|
253
268
|
extra_body: Body | None = None,
|
|
254
269
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
255
|
-
) ->
|
|
270
|
+
) -> SyncArrayPage[LettaMessageUnion]:
|
|
256
271
|
"""
|
|
257
272
|
Retrieve message history for an agent.
|
|
258
273
|
|
|
259
274
|
Args:
|
|
260
|
-
|
|
275
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
276
|
+
|
|
277
|
+
after: Message ID cursor for pagination. Returns messages that come after this message
|
|
278
|
+
ID in the specified sort order
|
|
261
279
|
|
|
262
280
|
assistant_message_tool_kwarg: The name of the message argument.
|
|
263
281
|
|
|
264
282
|
assistant_message_tool_name: The name of the designated message tool.
|
|
265
283
|
|
|
266
|
-
before: Message
|
|
284
|
+
before: Message ID cursor for pagination. Returns messages that come before this message
|
|
285
|
+
ID in the specified sort order
|
|
267
286
|
|
|
268
287
|
group_id: Group ID to filter messages by.
|
|
269
288
|
|
|
270
289
|
include_err: Whether to include error messages and error statuses. For debugging purposes
|
|
271
290
|
only.
|
|
272
291
|
|
|
273
|
-
limit: Maximum number of messages to
|
|
292
|
+
limit: Maximum number of messages to return
|
|
293
|
+
|
|
294
|
+
order: Sort order for messages by creation time. 'asc' for oldest first, 'desc' for
|
|
295
|
+
newest first
|
|
296
|
+
|
|
297
|
+
order_by: Field to sort by
|
|
274
298
|
|
|
275
299
|
use_assistant_message: Whether to use assistant messages
|
|
276
300
|
|
|
@@ -284,8 +308,9 @@ class MessagesResource(SyncAPIResource):
|
|
|
284
308
|
"""
|
|
285
309
|
if not agent_id:
|
|
286
310
|
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
287
|
-
return self.
|
|
311
|
+
return self._get_api_list(
|
|
288
312
|
f"/v1/agents/{agent_id}/messages",
|
|
313
|
+
page=SyncArrayPage[LettaMessageUnion],
|
|
289
314
|
options=make_request_options(
|
|
290
315
|
extra_headers=extra_headers,
|
|
291
316
|
extra_query=extra_query,
|
|
@@ -300,12 +325,14 @@ class MessagesResource(SyncAPIResource):
|
|
|
300
325
|
"group_id": group_id,
|
|
301
326
|
"include_err": include_err,
|
|
302
327
|
"limit": limit,
|
|
328
|
+
"order": order,
|
|
329
|
+
"order_by": order_by,
|
|
303
330
|
"use_assistant_message": use_assistant_message,
|
|
304
331
|
},
|
|
305
332
|
message_list_params.MessageListParams,
|
|
306
333
|
),
|
|
307
334
|
),
|
|
308
|
-
|
|
335
|
+
model=cast(Any, LettaMessageUnion), # Union types cannot be passed in as arguments in the type system
|
|
309
336
|
)
|
|
310
337
|
|
|
311
338
|
def cancel(
|
|
@@ -328,6 +355,8 @@ class MessagesResource(SyncAPIResource):
|
|
|
328
355
|
Note to cancel active runs associated with an agent, redis is required.
|
|
329
356
|
|
|
330
357
|
Args:
|
|
358
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
359
|
+
|
|
331
360
|
run_ids: Optional list of run IDs to cancel
|
|
332
361
|
|
|
333
362
|
extra_headers: Send extra headers
|
|
@@ -349,48 +378,25 @@ class MessagesResource(SyncAPIResource):
|
|
|
349
378
|
cast_to=MessageCancelResponse,
|
|
350
379
|
)
|
|
351
380
|
|
|
352
|
-
|
|
353
|
-
def preview_raw_payload(
|
|
381
|
+
def reset(
|
|
354
382
|
self,
|
|
355
383
|
agent_id: str,
|
|
356
384
|
*,
|
|
357
|
-
|
|
358
|
-
assistant_message_tool_kwarg: str | Omit = omit,
|
|
359
|
-
assistant_message_tool_name: str | Omit = omit,
|
|
360
|
-
enable_thinking: str | Omit = omit,
|
|
361
|
-
include_return_message_types: Optional[List[MessageType]] | Omit = omit,
|
|
362
|
-
max_steps: int | Omit = omit,
|
|
363
|
-
use_assistant_message: bool | Omit = omit,
|
|
385
|
+
add_default_initial_messages: bool | Omit = omit,
|
|
364
386
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
365
387
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
366
388
|
extra_headers: Headers | None = None,
|
|
367
389
|
extra_query: Query | None = None,
|
|
368
390
|
extra_body: Body | None = None,
|
|
369
391
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
370
|
-
) ->
|
|
392
|
+
) -> AgentState:
|
|
371
393
|
"""
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
This endpoint processes the message through the agent loop up until the LLM
|
|
375
|
-
request, then returns the raw request payload that would be sent to the LLM
|
|
376
|
-
provider. Useful for debugging and inspection.
|
|
394
|
+
Resets the messages for an agent
|
|
377
395
|
|
|
378
396
|
Args:
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
382
|
-
|
|
383
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
384
|
-
|
|
385
|
-
enable_thinking: If set to True, enables reasoning before responses or tool calls from the agent.
|
|
386
|
-
|
|
387
|
-
include_return_message_types: Only return specified message types in the response. If `None` (default) returns
|
|
388
|
-
all messages.
|
|
397
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
389
398
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
393
|
-
`send_message`) as `AssistantMessage` objects.
|
|
399
|
+
add_default_initial_messages: If true, adds the default initial messages after resetting.
|
|
394
400
|
|
|
395
401
|
extra_headers: Send extra headers
|
|
396
402
|
|
|
@@ -400,188 +406,17 @@ class MessagesResource(SyncAPIResource):
|
|
|
400
406
|
|
|
401
407
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
402
408
|
"""
|
|
403
|
-
...
|
|
404
|
-
|
|
405
|
-
@overload
|
|
406
|
-
def preview_raw_payload(
|
|
407
|
-
self,
|
|
408
|
-
agent_id: str,
|
|
409
|
-
*,
|
|
410
|
-
messages: Iterable[message_preview_raw_payload_params.LettaStreamingRequestMessage],
|
|
411
|
-
assistant_message_tool_kwarg: str | Omit = omit,
|
|
412
|
-
assistant_message_tool_name: str | Omit = omit,
|
|
413
|
-
background: bool | Omit = omit,
|
|
414
|
-
enable_thinking: str | Omit = omit,
|
|
415
|
-
include_pings: bool | Omit = omit,
|
|
416
|
-
include_return_message_types: Optional[List[MessageType]] | Omit = omit,
|
|
417
|
-
max_steps: int | Omit = omit,
|
|
418
|
-
stream_tokens: bool | Omit = omit,
|
|
419
|
-
use_assistant_message: bool | Omit = omit,
|
|
420
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
421
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
422
|
-
extra_headers: Headers | None = None,
|
|
423
|
-
extra_query: Query | None = None,
|
|
424
|
-
extra_body: Body | None = None,
|
|
425
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
426
|
-
) -> MessagePreviewRawPayloadResponse:
|
|
427
|
-
"""
|
|
428
|
-
Inspect the raw LLM request payload without sending it.
|
|
429
|
-
|
|
430
|
-
This endpoint processes the message through the agent loop up until the LLM
|
|
431
|
-
request, then returns the raw request payload that would be sent to the LLM
|
|
432
|
-
provider. Useful for debugging and inspection.
|
|
433
|
-
|
|
434
|
-
Args:
|
|
435
|
-
messages: The messages to be sent to the agent.
|
|
436
|
-
|
|
437
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
438
|
-
|
|
439
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
440
|
-
|
|
441
|
-
background: Whether to process the request in the background.
|
|
442
|
-
|
|
443
|
-
enable_thinking: If set to True, enables reasoning before responses or tool calls from the agent.
|
|
444
|
-
|
|
445
|
-
include_pings: Whether to include periodic keepalive ping messages in the stream to prevent
|
|
446
|
-
connection timeouts.
|
|
447
|
-
|
|
448
|
-
include_return_message_types: Only return specified message types in the response. If `None` (default) returns
|
|
449
|
-
all messages.
|
|
450
|
-
|
|
451
|
-
max_steps: Maximum number of steps the agent should take to process the request.
|
|
452
|
-
|
|
453
|
-
stream_tokens: Flag to determine if individual tokens should be streamed, rather than streaming
|
|
454
|
-
per step.
|
|
455
|
-
|
|
456
|
-
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
457
|
-
`send_message`) as `AssistantMessage` objects.
|
|
458
|
-
|
|
459
|
-
extra_headers: Send extra headers
|
|
460
|
-
|
|
461
|
-
extra_query: Add additional query parameters to the request
|
|
462
|
-
|
|
463
|
-
extra_body: Add additional JSON properties to the request
|
|
464
|
-
|
|
465
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
466
|
-
"""
|
|
467
|
-
...
|
|
468
|
-
|
|
469
|
-
@required_args(["messages"])
|
|
470
|
-
def preview_raw_payload(
|
|
471
|
-
self,
|
|
472
|
-
agent_id: str,
|
|
473
|
-
*,
|
|
474
|
-
messages: Iterable[message_preview_raw_payload_params.LettaRequestMessage]
|
|
475
|
-
| Iterable[message_preview_raw_payload_params.LettaStreamingRequestMessage],
|
|
476
|
-
assistant_message_tool_kwarg: str | Omit = omit,
|
|
477
|
-
assistant_message_tool_name: str | Omit = omit,
|
|
478
|
-
enable_thinking: str | Omit = omit,
|
|
479
|
-
include_return_message_types: Optional[List[MessageType]] | Omit = omit,
|
|
480
|
-
max_steps: int | Omit = omit,
|
|
481
|
-
use_assistant_message: bool | Omit = omit,
|
|
482
|
-
background: bool | Omit = omit,
|
|
483
|
-
include_pings: bool | Omit = omit,
|
|
484
|
-
stream_tokens: bool | Omit = omit,
|
|
485
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
486
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
487
|
-
extra_headers: Headers | None = None,
|
|
488
|
-
extra_query: Query | None = None,
|
|
489
|
-
extra_body: Body | None = None,
|
|
490
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
491
|
-
) -> MessagePreviewRawPayloadResponse:
|
|
492
409
|
if not agent_id:
|
|
493
410
|
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
494
|
-
return self.
|
|
495
|
-
f"/v1/agents/{agent_id}/messages
|
|
411
|
+
return self._patch(
|
|
412
|
+
f"/v1/agents/{agent_id}/reset-messages",
|
|
496
413
|
body=maybe_transform(
|
|
497
|
-
{
|
|
498
|
-
"messages": messages,
|
|
499
|
-
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
500
|
-
"assistant_message_tool_name": assistant_message_tool_name,
|
|
501
|
-
"enable_thinking": enable_thinking,
|
|
502
|
-
"include_return_message_types": include_return_message_types,
|
|
503
|
-
"max_steps": max_steps,
|
|
504
|
-
"use_assistant_message": use_assistant_message,
|
|
505
|
-
"background": background,
|
|
506
|
-
"include_pings": include_pings,
|
|
507
|
-
"stream_tokens": stream_tokens,
|
|
508
|
-
},
|
|
509
|
-
message_preview_raw_payload_params.MessagePreviewRawPayloadParams,
|
|
414
|
+
{"add_default_initial_messages": add_default_initial_messages}, message_reset_params.MessageResetParams
|
|
510
415
|
),
|
|
511
416
|
options=make_request_options(
|
|
512
417
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
513
418
|
),
|
|
514
|
-
cast_to=
|
|
515
|
-
)
|
|
516
|
-
|
|
517
|
-
def search(
|
|
518
|
-
self,
|
|
519
|
-
*,
|
|
520
|
-
end_date: Union[str, datetime, None] | Omit = omit,
|
|
521
|
-
limit: int | Omit = omit,
|
|
522
|
-
project_id: Optional[str] | Omit = omit,
|
|
523
|
-
query: Optional[str] | Omit = omit,
|
|
524
|
-
roles: Optional[List[MessageRole]] | Omit = omit,
|
|
525
|
-
search_mode: Literal["vector", "fts", "hybrid"] | Omit = omit,
|
|
526
|
-
start_date: Union[str, datetime, None] | Omit = omit,
|
|
527
|
-
template_id: Optional[str] | Omit = omit,
|
|
528
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
529
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
530
|
-
extra_headers: Headers | None = None,
|
|
531
|
-
extra_query: Query | None = None,
|
|
532
|
-
extra_body: Body | None = None,
|
|
533
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
534
|
-
) -> MessageSearchResponse:
|
|
535
|
-
"""
|
|
536
|
-
Search messages across the entire organization with optional project and
|
|
537
|
-
template filtering. Returns messages with FTS/vector ranks and total RRF score.
|
|
538
|
-
|
|
539
|
-
This is a cloud-only feature.
|
|
540
|
-
|
|
541
|
-
Args:
|
|
542
|
-
end_date: Filter messages created on or before this date
|
|
543
|
-
|
|
544
|
-
limit: Maximum number of results to return
|
|
545
|
-
|
|
546
|
-
project_id: Filter messages by project ID
|
|
547
|
-
|
|
548
|
-
query: Text query for full-text search
|
|
549
|
-
|
|
550
|
-
roles: Filter messages by role
|
|
551
|
-
|
|
552
|
-
search_mode: Search mode to use
|
|
553
|
-
|
|
554
|
-
start_date: Filter messages created after this date
|
|
555
|
-
|
|
556
|
-
template_id: Filter messages by template ID
|
|
557
|
-
|
|
558
|
-
extra_headers: Send extra headers
|
|
559
|
-
|
|
560
|
-
extra_query: Add additional query parameters to the request
|
|
561
|
-
|
|
562
|
-
extra_body: Add additional JSON properties to the request
|
|
563
|
-
|
|
564
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
565
|
-
"""
|
|
566
|
-
return self._post(
|
|
567
|
-
"/v1/agents/messages/search",
|
|
568
|
-
body=maybe_transform(
|
|
569
|
-
{
|
|
570
|
-
"end_date": end_date,
|
|
571
|
-
"limit": limit,
|
|
572
|
-
"project_id": project_id,
|
|
573
|
-
"query": query,
|
|
574
|
-
"roles": roles,
|
|
575
|
-
"search_mode": search_mode,
|
|
576
|
-
"start_date": start_date,
|
|
577
|
-
"template_id": template_id,
|
|
578
|
-
},
|
|
579
|
-
message_search_params.MessageSearchParams,
|
|
580
|
-
),
|
|
581
|
-
options=make_request_options(
|
|
582
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
583
|
-
),
|
|
584
|
-
cast_to=MessageSearchResponse,
|
|
419
|
+
cast_to=AgentState,
|
|
585
420
|
)
|
|
586
421
|
|
|
587
422
|
def send(
|
|
@@ -608,11 +443,15 @@ class MessagesResource(SyncAPIResource):
|
|
|
608
443
|
message from a user and processes it through the agent.
|
|
609
444
|
|
|
610
445
|
Args:
|
|
446
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
447
|
+
|
|
611
448
|
messages: The messages to be sent to the agent.
|
|
612
449
|
|
|
613
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
450
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
451
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
614
452
|
|
|
615
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
453
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
454
|
+
but deprecated for letta_v1_agent onward.
|
|
616
455
|
|
|
617
456
|
enable_thinking: If set to True, enables reasoning before responses or tool calls from the agent.
|
|
618
457
|
|
|
@@ -622,7 +461,8 @@ class MessagesResource(SyncAPIResource):
|
|
|
622
461
|
max_steps: Maximum number of steps the agent should take to process the request.
|
|
623
462
|
|
|
624
463
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
625
|
-
`send_message`) as `AssistantMessage` objects.
|
|
464
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
465
|
+
types, but deprecated for letta_v1_agent onward.
|
|
626
466
|
|
|
627
467
|
extra_headers: Send extra headers
|
|
628
468
|
|
|
@@ -679,15 +519,19 @@ class MessagesResource(SyncAPIResource):
|
|
|
679
519
|
processing happens in the background, and the status can be checked using the
|
|
680
520
|
run ID.
|
|
681
521
|
|
|
682
|
-
This is "asynchronous" in the sense that it's a background
|
|
683
|
-
must be fetched by the run ID.
|
|
522
|
+
This is "asynchronous" in the sense that it's a background run and explicitly
|
|
523
|
+
must be fetched by the run ID.
|
|
684
524
|
|
|
685
525
|
Args:
|
|
526
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
527
|
+
|
|
686
528
|
messages: The messages to be sent to the agent.
|
|
687
529
|
|
|
688
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
530
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
531
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
689
532
|
|
|
690
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
533
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
534
|
+
but deprecated for letta_v1_agent onward.
|
|
691
535
|
|
|
692
536
|
callback_url: Optional callback URL to POST to when the job completes
|
|
693
537
|
|
|
@@ -699,7 +543,8 @@ class MessagesResource(SyncAPIResource):
|
|
|
699
543
|
max_steps: Maximum number of steps the agent should take to process the request.
|
|
700
544
|
|
|
701
545
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
702
|
-
`send_message`) as `AssistantMessage` objects.
|
|
546
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
547
|
+
types, but deprecated for letta_v1_agent onward.
|
|
703
548
|
|
|
704
549
|
extra_headers: Send extra headers
|
|
705
550
|
|
|
@@ -732,11 +577,11 @@ class MessagesResource(SyncAPIResource):
|
|
|
732
577
|
cast_to=Run,
|
|
733
578
|
)
|
|
734
579
|
|
|
735
|
-
def
|
|
580
|
+
def stream(
|
|
736
581
|
self,
|
|
737
582
|
agent_id: str,
|
|
738
583
|
*,
|
|
739
|
-
messages: Iterable[
|
|
584
|
+
messages: Iterable[message_stream_params.Message],
|
|
740
585
|
assistant_message_tool_kwarg: str | Omit = omit,
|
|
741
586
|
assistant_message_tool_name: str | Omit = omit,
|
|
742
587
|
background: bool | Omit = omit,
|
|
@@ -760,11 +605,15 @@ class MessagesResource(SyncAPIResource):
|
|
|
760
605
|
of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
761
606
|
|
|
762
607
|
Args:
|
|
608
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
609
|
+
|
|
763
610
|
messages: The messages to be sent to the agent.
|
|
764
611
|
|
|
765
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
612
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
613
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
766
614
|
|
|
767
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
615
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
616
|
+
but deprecated for letta_v1_agent onward.
|
|
768
617
|
|
|
769
618
|
background: Whether to process the request in the background.
|
|
770
619
|
|
|
@@ -782,7 +631,8 @@ class MessagesResource(SyncAPIResource):
|
|
|
782
631
|
per step.
|
|
783
632
|
|
|
784
633
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
785
|
-
`send_message`) as `AssistantMessage` objects.
|
|
634
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
635
|
+
types, but deprecated for letta_v1_agent onward.
|
|
786
636
|
|
|
787
637
|
extra_headers: Send extra headers
|
|
788
638
|
|
|
@@ -809,7 +659,7 @@ class MessagesResource(SyncAPIResource):
|
|
|
809
659
|
"stream_tokens": stream_tokens,
|
|
810
660
|
"use_assistant_message": use_assistant_message,
|
|
811
661
|
},
|
|
812
|
-
|
|
662
|
+
message_stream_params.MessageStreamParams,
|
|
813
663
|
),
|
|
814
664
|
options=make_request_options(
|
|
815
665
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
@@ -817,6 +667,42 @@ class MessagesResource(SyncAPIResource):
|
|
|
817
667
|
cast_to=object,
|
|
818
668
|
)
|
|
819
669
|
|
|
670
|
+
def summarize(
|
|
671
|
+
self,
|
|
672
|
+
agent_id: str,
|
|
673
|
+
*,
|
|
674
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
675
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
676
|
+
extra_headers: Headers | None = None,
|
|
677
|
+
extra_query: Query | None = None,
|
|
678
|
+
extra_body: Body | None = None,
|
|
679
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
680
|
+
) -> None:
|
|
681
|
+
"""
|
|
682
|
+
Summarize an agent's conversation history.
|
|
683
|
+
|
|
684
|
+
Args:
|
|
685
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
686
|
+
|
|
687
|
+
extra_headers: Send extra headers
|
|
688
|
+
|
|
689
|
+
extra_query: Add additional query parameters to the request
|
|
690
|
+
|
|
691
|
+
extra_body: Add additional JSON properties to the request
|
|
692
|
+
|
|
693
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
694
|
+
"""
|
|
695
|
+
if not agent_id:
|
|
696
|
+
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
697
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
698
|
+
return self._post(
|
|
699
|
+
f"/v1/agents/{agent_id}/summarize",
|
|
700
|
+
options=make_request_options(
|
|
701
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
702
|
+
),
|
|
703
|
+
cast_to=NoneType,
|
|
704
|
+
)
|
|
705
|
+
|
|
820
706
|
|
|
821
707
|
class AsyncMessagesResource(AsyncAPIResource):
|
|
822
708
|
@cached_property
|
|
@@ -857,6 +743,10 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
857
743
|
Update the details of a message associated with an agent.
|
|
858
744
|
|
|
859
745
|
Args:
|
|
746
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
747
|
+
|
|
748
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
749
|
+
|
|
860
750
|
content: The message content sent by the system (can be a string or an array of
|
|
861
751
|
multi-modal content parts)
|
|
862
752
|
|
|
@@ -889,6 +779,10 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
889
779
|
Update the details of a message associated with an agent.
|
|
890
780
|
|
|
891
781
|
Args:
|
|
782
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
783
|
+
|
|
784
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
785
|
+
|
|
892
786
|
content: The message content sent by the user (can be a string or an array of multi-modal
|
|
893
787
|
content parts)
|
|
894
788
|
|
|
@@ -921,6 +815,10 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
921
815
|
Update the details of a message associated with an agent.
|
|
922
816
|
|
|
923
817
|
Args:
|
|
818
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
819
|
+
|
|
820
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
821
|
+
|
|
924
822
|
extra_headers: Send extra headers
|
|
925
823
|
|
|
926
824
|
extra_query: Add additional query parameters to the request
|
|
@@ -950,6 +848,10 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
950
848
|
Update the details of a message associated with an agent.
|
|
951
849
|
|
|
952
850
|
Args:
|
|
851
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
852
|
+
|
|
853
|
+
message_id: The ID of the message in the format 'message-<uuid4>'
|
|
854
|
+
|
|
953
855
|
content: The message content sent by the assistant (can be a string or an array of
|
|
954
856
|
content parts)
|
|
955
857
|
|
|
@@ -1008,7 +910,7 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1008
910
|
),
|
|
1009
911
|
)
|
|
1010
912
|
|
|
1011
|
-
|
|
913
|
+
def list(
|
|
1012
914
|
self,
|
|
1013
915
|
agent_id: str,
|
|
1014
916
|
*,
|
|
@@ -1018,7 +920,9 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1018
920
|
before: Optional[str] | Omit = omit,
|
|
1019
921
|
group_id: Optional[str] | Omit = omit,
|
|
1020
922
|
include_err: Optional[bool] | Omit = omit,
|
|
1021
|
-
limit: int | Omit = omit,
|
|
923
|
+
limit: Optional[int] | Omit = omit,
|
|
924
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
925
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
1022
926
|
use_assistant_message: bool | Omit = omit,
|
|
1023
927
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1024
928
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -1026,25 +930,34 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1026
930
|
extra_query: Query | None = None,
|
|
1027
931
|
extra_body: Body | None = None,
|
|
1028
932
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1029
|
-
) ->
|
|
933
|
+
) -> AsyncPaginator[LettaMessageUnion, AsyncArrayPage[LettaMessageUnion]]:
|
|
1030
934
|
"""
|
|
1031
935
|
Retrieve message history for an agent.
|
|
1032
936
|
|
|
1033
937
|
Args:
|
|
1034
|
-
|
|
938
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
939
|
+
|
|
940
|
+
after: Message ID cursor for pagination. Returns messages that come after this message
|
|
941
|
+
ID in the specified sort order
|
|
1035
942
|
|
|
1036
943
|
assistant_message_tool_kwarg: The name of the message argument.
|
|
1037
944
|
|
|
1038
945
|
assistant_message_tool_name: The name of the designated message tool.
|
|
1039
946
|
|
|
1040
|
-
before: Message
|
|
947
|
+
before: Message ID cursor for pagination. Returns messages that come before this message
|
|
948
|
+
ID in the specified sort order
|
|
1041
949
|
|
|
1042
950
|
group_id: Group ID to filter messages by.
|
|
1043
951
|
|
|
1044
952
|
include_err: Whether to include error messages and error statuses. For debugging purposes
|
|
1045
953
|
only.
|
|
1046
954
|
|
|
1047
|
-
limit: Maximum number of messages to
|
|
955
|
+
limit: Maximum number of messages to return
|
|
956
|
+
|
|
957
|
+
order: Sort order for messages by creation time. 'asc' for oldest first, 'desc' for
|
|
958
|
+
newest first
|
|
959
|
+
|
|
960
|
+
order_by: Field to sort by
|
|
1048
961
|
|
|
1049
962
|
use_assistant_message: Whether to use assistant messages
|
|
1050
963
|
|
|
@@ -1058,14 +971,15 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1058
971
|
"""
|
|
1059
972
|
if not agent_id:
|
|
1060
973
|
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
1061
|
-
return
|
|
974
|
+
return self._get_api_list(
|
|
1062
975
|
f"/v1/agents/{agent_id}/messages",
|
|
976
|
+
page=AsyncArrayPage[LettaMessageUnion],
|
|
1063
977
|
options=make_request_options(
|
|
1064
978
|
extra_headers=extra_headers,
|
|
1065
979
|
extra_query=extra_query,
|
|
1066
980
|
extra_body=extra_body,
|
|
1067
981
|
timeout=timeout,
|
|
1068
|
-
query=
|
|
982
|
+
query=maybe_transform(
|
|
1069
983
|
{
|
|
1070
984
|
"after": after,
|
|
1071
985
|
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
@@ -1074,12 +988,14 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1074
988
|
"group_id": group_id,
|
|
1075
989
|
"include_err": include_err,
|
|
1076
990
|
"limit": limit,
|
|
991
|
+
"order": order,
|
|
992
|
+
"order_by": order_by,
|
|
1077
993
|
"use_assistant_message": use_assistant_message,
|
|
1078
994
|
},
|
|
1079
995
|
message_list_params.MessageListParams,
|
|
1080
996
|
),
|
|
1081
997
|
),
|
|
1082
|
-
|
|
998
|
+
model=cast(Any, LettaMessageUnion), # Union types cannot be passed in as arguments in the type system
|
|
1083
999
|
)
|
|
1084
1000
|
|
|
1085
1001
|
async def cancel(
|
|
@@ -1102,6 +1018,8 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1102
1018
|
Note to cancel active runs associated with an agent, redis is required.
|
|
1103
1019
|
|
|
1104
1020
|
Args:
|
|
1021
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1022
|
+
|
|
1105
1023
|
run_ids: Optional list of run IDs to cancel
|
|
1106
1024
|
|
|
1107
1025
|
extra_headers: Send extra headers
|
|
@@ -1123,48 +1041,25 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1123
1041
|
cast_to=MessageCancelResponse,
|
|
1124
1042
|
)
|
|
1125
1043
|
|
|
1126
|
-
|
|
1127
|
-
async def preview_raw_payload(
|
|
1044
|
+
async def reset(
|
|
1128
1045
|
self,
|
|
1129
1046
|
agent_id: str,
|
|
1130
1047
|
*,
|
|
1131
|
-
|
|
1132
|
-
assistant_message_tool_kwarg: str | Omit = omit,
|
|
1133
|
-
assistant_message_tool_name: str | Omit = omit,
|
|
1134
|
-
enable_thinking: str | Omit = omit,
|
|
1135
|
-
include_return_message_types: Optional[List[MessageType]] | Omit = omit,
|
|
1136
|
-
max_steps: int | Omit = omit,
|
|
1137
|
-
use_assistant_message: bool | Omit = omit,
|
|
1048
|
+
add_default_initial_messages: bool | Omit = omit,
|
|
1138
1049
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1139
1050
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1140
1051
|
extra_headers: Headers | None = None,
|
|
1141
1052
|
extra_query: Query | None = None,
|
|
1142
1053
|
extra_body: Body | None = None,
|
|
1143
1054
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1144
|
-
) ->
|
|
1055
|
+
) -> AgentState:
|
|
1145
1056
|
"""
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
This endpoint processes the message through the agent loop up until the LLM
|
|
1149
|
-
request, then returns the raw request payload that would be sent to the LLM
|
|
1150
|
-
provider. Useful for debugging and inspection.
|
|
1057
|
+
Resets the messages for an agent
|
|
1151
1058
|
|
|
1152
1059
|
Args:
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
1156
|
-
|
|
1157
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
1158
|
-
|
|
1159
|
-
enable_thinking: If set to True, enables reasoning before responses or tool calls from the agent.
|
|
1160
|
-
|
|
1161
|
-
include_return_message_types: Only return specified message types in the response. If `None` (default) returns
|
|
1162
|
-
all messages.
|
|
1163
|
-
|
|
1164
|
-
max_steps: Maximum number of steps the agent should take to process the request.
|
|
1060
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1165
1061
|
|
|
1166
|
-
|
|
1167
|
-
`send_message`) as `AssistantMessage` objects.
|
|
1062
|
+
add_default_initial_messages: If true, adds the default initial messages after resetting.
|
|
1168
1063
|
|
|
1169
1064
|
extra_headers: Send extra headers
|
|
1170
1065
|
|
|
@@ -1174,188 +1069,17 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1174
1069
|
|
|
1175
1070
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
1176
1071
|
"""
|
|
1177
|
-
...
|
|
1178
|
-
|
|
1179
|
-
@overload
|
|
1180
|
-
async def preview_raw_payload(
|
|
1181
|
-
self,
|
|
1182
|
-
agent_id: str,
|
|
1183
|
-
*,
|
|
1184
|
-
messages: Iterable[message_preview_raw_payload_params.LettaStreamingRequestMessage],
|
|
1185
|
-
assistant_message_tool_kwarg: str | Omit = omit,
|
|
1186
|
-
assistant_message_tool_name: str | Omit = omit,
|
|
1187
|
-
background: bool | Omit = omit,
|
|
1188
|
-
enable_thinking: str | Omit = omit,
|
|
1189
|
-
include_pings: bool | Omit = omit,
|
|
1190
|
-
include_return_message_types: Optional[List[MessageType]] | Omit = omit,
|
|
1191
|
-
max_steps: int | Omit = omit,
|
|
1192
|
-
stream_tokens: bool | Omit = omit,
|
|
1193
|
-
use_assistant_message: bool | Omit = omit,
|
|
1194
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1195
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1196
|
-
extra_headers: Headers | None = None,
|
|
1197
|
-
extra_query: Query | None = None,
|
|
1198
|
-
extra_body: Body | None = None,
|
|
1199
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1200
|
-
) -> MessagePreviewRawPayloadResponse:
|
|
1201
|
-
"""
|
|
1202
|
-
Inspect the raw LLM request payload without sending it.
|
|
1203
|
-
|
|
1204
|
-
This endpoint processes the message through the agent loop up until the LLM
|
|
1205
|
-
request, then returns the raw request payload that would be sent to the LLM
|
|
1206
|
-
provider. Useful for debugging and inspection.
|
|
1207
|
-
|
|
1208
|
-
Args:
|
|
1209
|
-
messages: The messages to be sent to the agent.
|
|
1210
|
-
|
|
1211
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
1212
|
-
|
|
1213
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
1214
|
-
|
|
1215
|
-
background: Whether to process the request in the background.
|
|
1216
|
-
|
|
1217
|
-
enable_thinking: If set to True, enables reasoning before responses or tool calls from the agent.
|
|
1218
|
-
|
|
1219
|
-
include_pings: Whether to include periodic keepalive ping messages in the stream to prevent
|
|
1220
|
-
connection timeouts.
|
|
1221
|
-
|
|
1222
|
-
include_return_message_types: Only return specified message types in the response. If `None` (default) returns
|
|
1223
|
-
all messages.
|
|
1224
|
-
|
|
1225
|
-
max_steps: Maximum number of steps the agent should take to process the request.
|
|
1226
|
-
|
|
1227
|
-
stream_tokens: Flag to determine if individual tokens should be streamed, rather than streaming
|
|
1228
|
-
per step.
|
|
1229
|
-
|
|
1230
|
-
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
1231
|
-
`send_message`) as `AssistantMessage` objects.
|
|
1232
|
-
|
|
1233
|
-
extra_headers: Send extra headers
|
|
1234
|
-
|
|
1235
|
-
extra_query: Add additional query parameters to the request
|
|
1236
|
-
|
|
1237
|
-
extra_body: Add additional JSON properties to the request
|
|
1238
|
-
|
|
1239
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1240
|
-
"""
|
|
1241
|
-
...
|
|
1242
|
-
|
|
1243
|
-
@required_args(["messages"])
|
|
1244
|
-
async def preview_raw_payload(
|
|
1245
|
-
self,
|
|
1246
|
-
agent_id: str,
|
|
1247
|
-
*,
|
|
1248
|
-
messages: Iterable[message_preview_raw_payload_params.LettaRequestMessage]
|
|
1249
|
-
| Iterable[message_preview_raw_payload_params.LettaStreamingRequestMessage],
|
|
1250
|
-
assistant_message_tool_kwarg: str | Omit = omit,
|
|
1251
|
-
assistant_message_tool_name: str | Omit = omit,
|
|
1252
|
-
enable_thinking: str | Omit = omit,
|
|
1253
|
-
include_return_message_types: Optional[List[MessageType]] | Omit = omit,
|
|
1254
|
-
max_steps: int | Omit = omit,
|
|
1255
|
-
use_assistant_message: bool | Omit = omit,
|
|
1256
|
-
background: bool | Omit = omit,
|
|
1257
|
-
include_pings: bool | Omit = omit,
|
|
1258
|
-
stream_tokens: bool | Omit = omit,
|
|
1259
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1260
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1261
|
-
extra_headers: Headers | None = None,
|
|
1262
|
-
extra_query: Query | None = None,
|
|
1263
|
-
extra_body: Body | None = None,
|
|
1264
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1265
|
-
) -> MessagePreviewRawPayloadResponse:
|
|
1266
1072
|
if not agent_id:
|
|
1267
1073
|
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
1268
|
-
return await self.
|
|
1269
|
-
f"/v1/agents/{agent_id}/messages
|
|
1074
|
+
return await self._patch(
|
|
1075
|
+
f"/v1/agents/{agent_id}/reset-messages",
|
|
1270
1076
|
body=await async_maybe_transform(
|
|
1271
|
-
{
|
|
1272
|
-
"messages": messages,
|
|
1273
|
-
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
1274
|
-
"assistant_message_tool_name": assistant_message_tool_name,
|
|
1275
|
-
"enable_thinking": enable_thinking,
|
|
1276
|
-
"include_return_message_types": include_return_message_types,
|
|
1277
|
-
"max_steps": max_steps,
|
|
1278
|
-
"use_assistant_message": use_assistant_message,
|
|
1279
|
-
"background": background,
|
|
1280
|
-
"include_pings": include_pings,
|
|
1281
|
-
"stream_tokens": stream_tokens,
|
|
1282
|
-
},
|
|
1283
|
-
message_preview_raw_payload_params.MessagePreviewRawPayloadParams,
|
|
1077
|
+
{"add_default_initial_messages": add_default_initial_messages}, message_reset_params.MessageResetParams
|
|
1284
1078
|
),
|
|
1285
1079
|
options=make_request_options(
|
|
1286
1080
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1287
1081
|
),
|
|
1288
|
-
cast_to=
|
|
1289
|
-
)
|
|
1290
|
-
|
|
1291
|
-
async def search(
|
|
1292
|
-
self,
|
|
1293
|
-
*,
|
|
1294
|
-
end_date: Union[str, datetime, None] | Omit = omit,
|
|
1295
|
-
limit: int | Omit = omit,
|
|
1296
|
-
project_id: Optional[str] | Omit = omit,
|
|
1297
|
-
query: Optional[str] | Omit = omit,
|
|
1298
|
-
roles: Optional[List[MessageRole]] | Omit = omit,
|
|
1299
|
-
search_mode: Literal["vector", "fts", "hybrid"] | Omit = omit,
|
|
1300
|
-
start_date: Union[str, datetime, None] | Omit = omit,
|
|
1301
|
-
template_id: Optional[str] | Omit = omit,
|
|
1302
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1303
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1304
|
-
extra_headers: Headers | None = None,
|
|
1305
|
-
extra_query: Query | None = None,
|
|
1306
|
-
extra_body: Body | None = None,
|
|
1307
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1308
|
-
) -> MessageSearchResponse:
|
|
1309
|
-
"""
|
|
1310
|
-
Search messages across the entire organization with optional project and
|
|
1311
|
-
template filtering. Returns messages with FTS/vector ranks and total RRF score.
|
|
1312
|
-
|
|
1313
|
-
This is a cloud-only feature.
|
|
1314
|
-
|
|
1315
|
-
Args:
|
|
1316
|
-
end_date: Filter messages created on or before this date
|
|
1317
|
-
|
|
1318
|
-
limit: Maximum number of results to return
|
|
1319
|
-
|
|
1320
|
-
project_id: Filter messages by project ID
|
|
1321
|
-
|
|
1322
|
-
query: Text query for full-text search
|
|
1323
|
-
|
|
1324
|
-
roles: Filter messages by role
|
|
1325
|
-
|
|
1326
|
-
search_mode: Search mode to use
|
|
1327
|
-
|
|
1328
|
-
start_date: Filter messages created after this date
|
|
1329
|
-
|
|
1330
|
-
template_id: Filter messages by template ID
|
|
1331
|
-
|
|
1332
|
-
extra_headers: Send extra headers
|
|
1333
|
-
|
|
1334
|
-
extra_query: Add additional query parameters to the request
|
|
1335
|
-
|
|
1336
|
-
extra_body: Add additional JSON properties to the request
|
|
1337
|
-
|
|
1338
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1339
|
-
"""
|
|
1340
|
-
return await self._post(
|
|
1341
|
-
"/v1/agents/messages/search",
|
|
1342
|
-
body=await async_maybe_transform(
|
|
1343
|
-
{
|
|
1344
|
-
"end_date": end_date,
|
|
1345
|
-
"limit": limit,
|
|
1346
|
-
"project_id": project_id,
|
|
1347
|
-
"query": query,
|
|
1348
|
-
"roles": roles,
|
|
1349
|
-
"search_mode": search_mode,
|
|
1350
|
-
"start_date": start_date,
|
|
1351
|
-
"template_id": template_id,
|
|
1352
|
-
},
|
|
1353
|
-
message_search_params.MessageSearchParams,
|
|
1354
|
-
),
|
|
1355
|
-
options=make_request_options(
|
|
1356
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1357
|
-
),
|
|
1358
|
-
cast_to=MessageSearchResponse,
|
|
1082
|
+
cast_to=AgentState,
|
|
1359
1083
|
)
|
|
1360
1084
|
|
|
1361
1085
|
async def send(
|
|
@@ -1382,11 +1106,15 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1382
1106
|
message from a user and processes it through the agent.
|
|
1383
1107
|
|
|
1384
1108
|
Args:
|
|
1109
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1110
|
+
|
|
1385
1111
|
messages: The messages to be sent to the agent.
|
|
1386
1112
|
|
|
1387
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
1113
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
1114
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
1388
1115
|
|
|
1389
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
1116
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
1117
|
+
but deprecated for letta_v1_agent onward.
|
|
1390
1118
|
|
|
1391
1119
|
enable_thinking: If set to True, enables reasoning before responses or tool calls from the agent.
|
|
1392
1120
|
|
|
@@ -1396,7 +1124,8 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1396
1124
|
max_steps: Maximum number of steps the agent should take to process the request.
|
|
1397
1125
|
|
|
1398
1126
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
1399
|
-
`send_message`) as `AssistantMessage` objects.
|
|
1127
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
1128
|
+
types, but deprecated for letta_v1_agent onward.
|
|
1400
1129
|
|
|
1401
1130
|
extra_headers: Send extra headers
|
|
1402
1131
|
|
|
@@ -1453,15 +1182,19 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1453
1182
|
processing happens in the background, and the status can be checked using the
|
|
1454
1183
|
run ID.
|
|
1455
1184
|
|
|
1456
|
-
This is "asynchronous" in the sense that it's a background
|
|
1457
|
-
must be fetched by the run ID.
|
|
1185
|
+
This is "asynchronous" in the sense that it's a background run and explicitly
|
|
1186
|
+
must be fetched by the run ID.
|
|
1458
1187
|
|
|
1459
1188
|
Args:
|
|
1189
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1190
|
+
|
|
1460
1191
|
messages: The messages to be sent to the agent.
|
|
1461
1192
|
|
|
1462
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
1193
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
1194
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
1463
1195
|
|
|
1464
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
1196
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
1197
|
+
but deprecated for letta_v1_agent onward.
|
|
1465
1198
|
|
|
1466
1199
|
callback_url: Optional callback URL to POST to when the job completes
|
|
1467
1200
|
|
|
@@ -1473,7 +1206,8 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1473
1206
|
max_steps: Maximum number of steps the agent should take to process the request.
|
|
1474
1207
|
|
|
1475
1208
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
1476
|
-
`send_message`) as `AssistantMessage` objects.
|
|
1209
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
1210
|
+
types, but deprecated for letta_v1_agent onward.
|
|
1477
1211
|
|
|
1478
1212
|
extra_headers: Send extra headers
|
|
1479
1213
|
|
|
@@ -1506,11 +1240,11 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1506
1240
|
cast_to=Run,
|
|
1507
1241
|
)
|
|
1508
1242
|
|
|
1509
|
-
async def
|
|
1243
|
+
async def stream(
|
|
1510
1244
|
self,
|
|
1511
1245
|
agent_id: str,
|
|
1512
1246
|
*,
|
|
1513
|
-
messages: Iterable[
|
|
1247
|
+
messages: Iterable[message_stream_params.Message],
|
|
1514
1248
|
assistant_message_tool_kwarg: str | Omit = omit,
|
|
1515
1249
|
assistant_message_tool_name: str | Omit = omit,
|
|
1516
1250
|
background: bool | Omit = omit,
|
|
@@ -1534,11 +1268,15 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1534
1268
|
of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
1535
1269
|
|
|
1536
1270
|
Args:
|
|
1271
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1272
|
+
|
|
1537
1273
|
messages: The messages to be sent to the agent.
|
|
1538
1274
|
|
|
1539
|
-
assistant_message_tool_kwarg: The name of the message argument in the designated message tool.
|
|
1275
|
+
assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
|
|
1276
|
+
for legacy agent types, but deprecated for letta_v1_agent onward.
|
|
1540
1277
|
|
|
1541
|
-
assistant_message_tool_name: The name of the designated message tool.
|
|
1278
|
+
assistant_message_tool_name: The name of the designated message tool. Still supported for legacy agent types,
|
|
1279
|
+
but deprecated for letta_v1_agent onward.
|
|
1542
1280
|
|
|
1543
1281
|
background: Whether to process the request in the background.
|
|
1544
1282
|
|
|
@@ -1556,7 +1294,8 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1556
1294
|
per step.
|
|
1557
1295
|
|
|
1558
1296
|
use_assistant_message: Whether the server should parse specific tool call arguments (default
|
|
1559
|
-
`send_message`) as `AssistantMessage` objects.
|
|
1297
|
+
`send_message`) as `AssistantMessage` objects. Still supported for legacy agent
|
|
1298
|
+
types, but deprecated for letta_v1_agent onward.
|
|
1560
1299
|
|
|
1561
1300
|
extra_headers: Send extra headers
|
|
1562
1301
|
|
|
@@ -1583,7 +1322,7 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1583
1322
|
"stream_tokens": stream_tokens,
|
|
1584
1323
|
"use_assistant_message": use_assistant_message,
|
|
1585
1324
|
},
|
|
1586
|
-
|
|
1325
|
+
message_stream_params.MessageStreamParams,
|
|
1587
1326
|
),
|
|
1588
1327
|
options=make_request_options(
|
|
1589
1328
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
@@ -1591,6 +1330,42 @@ class AsyncMessagesResource(AsyncAPIResource):
|
|
|
1591
1330
|
cast_to=object,
|
|
1592
1331
|
)
|
|
1593
1332
|
|
|
1333
|
+
async def summarize(
|
|
1334
|
+
self,
|
|
1335
|
+
agent_id: str,
|
|
1336
|
+
*,
|
|
1337
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1338
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1339
|
+
extra_headers: Headers | None = None,
|
|
1340
|
+
extra_query: Query | None = None,
|
|
1341
|
+
extra_body: Body | None = None,
|
|
1342
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1343
|
+
) -> None:
|
|
1344
|
+
"""
|
|
1345
|
+
Summarize an agent's conversation history.
|
|
1346
|
+
|
|
1347
|
+
Args:
|
|
1348
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1349
|
+
|
|
1350
|
+
extra_headers: Send extra headers
|
|
1351
|
+
|
|
1352
|
+
extra_query: Add additional query parameters to the request
|
|
1353
|
+
|
|
1354
|
+
extra_body: Add additional JSON properties to the request
|
|
1355
|
+
|
|
1356
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
1357
|
+
"""
|
|
1358
|
+
if not agent_id:
|
|
1359
|
+
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
1360
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
1361
|
+
return await self._post(
|
|
1362
|
+
f"/v1/agents/{agent_id}/summarize",
|
|
1363
|
+
options=make_request_options(
|
|
1364
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1365
|
+
),
|
|
1366
|
+
cast_to=NoneType,
|
|
1367
|
+
)
|
|
1368
|
+
|
|
1594
1369
|
|
|
1595
1370
|
class MessagesResourceWithRawResponse:
|
|
1596
1371
|
def __init__(self, messages: MessagesResource) -> None:
|
|
@@ -1605,11 +1380,8 @@ class MessagesResourceWithRawResponse:
|
|
|
1605
1380
|
self.cancel = to_raw_response_wrapper(
|
|
1606
1381
|
messages.cancel,
|
|
1607
1382
|
)
|
|
1608
|
-
self.
|
|
1609
|
-
messages.
|
|
1610
|
-
)
|
|
1611
|
-
self.search = to_raw_response_wrapper(
|
|
1612
|
-
messages.search,
|
|
1383
|
+
self.reset = to_raw_response_wrapper(
|
|
1384
|
+
messages.reset,
|
|
1613
1385
|
)
|
|
1614
1386
|
self.send = to_raw_response_wrapper(
|
|
1615
1387
|
messages.send,
|
|
@@ -1617,8 +1389,11 @@ class MessagesResourceWithRawResponse:
|
|
|
1617
1389
|
self.send_async = to_raw_response_wrapper(
|
|
1618
1390
|
messages.send_async,
|
|
1619
1391
|
)
|
|
1620
|
-
self.
|
|
1621
|
-
messages.
|
|
1392
|
+
self.stream = to_raw_response_wrapper(
|
|
1393
|
+
messages.stream,
|
|
1394
|
+
)
|
|
1395
|
+
self.summarize = to_raw_response_wrapper(
|
|
1396
|
+
messages.summarize,
|
|
1622
1397
|
)
|
|
1623
1398
|
|
|
1624
1399
|
|
|
@@ -1635,11 +1410,8 @@ class AsyncMessagesResourceWithRawResponse:
|
|
|
1635
1410
|
self.cancel = async_to_raw_response_wrapper(
|
|
1636
1411
|
messages.cancel,
|
|
1637
1412
|
)
|
|
1638
|
-
self.
|
|
1639
|
-
messages.
|
|
1640
|
-
)
|
|
1641
|
-
self.search = async_to_raw_response_wrapper(
|
|
1642
|
-
messages.search,
|
|
1413
|
+
self.reset = async_to_raw_response_wrapper(
|
|
1414
|
+
messages.reset,
|
|
1643
1415
|
)
|
|
1644
1416
|
self.send = async_to_raw_response_wrapper(
|
|
1645
1417
|
messages.send,
|
|
@@ -1647,8 +1419,11 @@ class AsyncMessagesResourceWithRawResponse:
|
|
|
1647
1419
|
self.send_async = async_to_raw_response_wrapper(
|
|
1648
1420
|
messages.send_async,
|
|
1649
1421
|
)
|
|
1650
|
-
self.
|
|
1651
|
-
messages.
|
|
1422
|
+
self.stream = async_to_raw_response_wrapper(
|
|
1423
|
+
messages.stream,
|
|
1424
|
+
)
|
|
1425
|
+
self.summarize = async_to_raw_response_wrapper(
|
|
1426
|
+
messages.summarize,
|
|
1652
1427
|
)
|
|
1653
1428
|
|
|
1654
1429
|
|
|
@@ -1665,11 +1440,8 @@ class MessagesResourceWithStreamingResponse:
|
|
|
1665
1440
|
self.cancel = to_streamed_response_wrapper(
|
|
1666
1441
|
messages.cancel,
|
|
1667
1442
|
)
|
|
1668
|
-
self.
|
|
1669
|
-
messages.
|
|
1670
|
-
)
|
|
1671
|
-
self.search = to_streamed_response_wrapper(
|
|
1672
|
-
messages.search,
|
|
1443
|
+
self.reset = to_streamed_response_wrapper(
|
|
1444
|
+
messages.reset,
|
|
1673
1445
|
)
|
|
1674
1446
|
self.send = to_streamed_response_wrapper(
|
|
1675
1447
|
messages.send,
|
|
@@ -1677,8 +1449,11 @@ class MessagesResourceWithStreamingResponse:
|
|
|
1677
1449
|
self.send_async = to_streamed_response_wrapper(
|
|
1678
1450
|
messages.send_async,
|
|
1679
1451
|
)
|
|
1680
|
-
self.
|
|
1681
|
-
messages.
|
|
1452
|
+
self.stream = to_streamed_response_wrapper(
|
|
1453
|
+
messages.stream,
|
|
1454
|
+
)
|
|
1455
|
+
self.summarize = to_streamed_response_wrapper(
|
|
1456
|
+
messages.summarize,
|
|
1682
1457
|
)
|
|
1683
1458
|
|
|
1684
1459
|
|
|
@@ -1695,11 +1470,8 @@ class AsyncMessagesResourceWithStreamingResponse:
|
|
|
1695
1470
|
self.cancel = async_to_streamed_response_wrapper(
|
|
1696
1471
|
messages.cancel,
|
|
1697
1472
|
)
|
|
1698
|
-
self.
|
|
1699
|
-
messages.
|
|
1700
|
-
)
|
|
1701
|
-
self.search = async_to_streamed_response_wrapper(
|
|
1702
|
-
messages.search,
|
|
1473
|
+
self.reset = async_to_streamed_response_wrapper(
|
|
1474
|
+
messages.reset,
|
|
1703
1475
|
)
|
|
1704
1476
|
self.send = async_to_streamed_response_wrapper(
|
|
1705
1477
|
messages.send,
|
|
@@ -1707,6 +1479,9 @@ class AsyncMessagesResourceWithStreamingResponse:
|
|
|
1707
1479
|
self.send_async = async_to_streamed_response_wrapper(
|
|
1708
1480
|
messages.send_async,
|
|
1709
1481
|
)
|
|
1710
|
-
self.
|
|
1711
|
-
messages.
|
|
1482
|
+
self.stream = async_to_streamed_response_wrapper(
|
|
1483
|
+
messages.stream,
|
|
1484
|
+
)
|
|
1485
|
+
self.summarize = async_to_streamed_response_wrapper(
|
|
1486
|
+
messages.summarize,
|
|
1712
1487
|
)
|