letta-client 0.1.22__py3-none-any.whl → 0.1.23__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_client/__init__.py +464 -7
- letta_client/agents/__init__.py +1 -2
- letta_client/agents/messages/__init__.py +2 -2
- letta_client/agents/messages/client.py +114 -63
- letta_client/agents/messages/types/__init__.py +1 -2
- letta_client/base_client.py +4 -0
- letta_client/core/client_wrapper.py +1 -1
- letta_client/templates/__init__.py +335 -0
- letta_client/templates/client.py +188 -0
- letta_client/templates/types/__init__.py +659 -0
- letta_client/templates/types/templates_create_agents_from_template_response.py +22 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item.py +88 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_agent_type.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_created_at.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_created_at_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_created_by_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_created_by_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_description.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_description_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config.py +58 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_azure_deployment.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_azure_deployment_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_azure_endpoint.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_azure_endpoint_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_azure_version.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_azure_version_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_embedding_chunk_size.py +15 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_embedding_chunk_size_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_embedding_endpoint.py +15 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_embedding_endpoint_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_embedding_endpoint_type.py +27 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_handle.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_embedding_config_handle_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_last_updated_by_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_last_updated_by_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config.py +46 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_handle.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_handle_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_model_endpoint.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_model_endpoint_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_model_endpoint_type.py +27 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_model_wrapper.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_model_wrapper_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_put_inner_thoughts_in_kwargs.py +15 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_put_inner_thoughts_in_kwargs_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_llm_config_temperature.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory.py +26 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item.py +65 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_created_by_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_created_by_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_description.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_description_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_id.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_is_template.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_label.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_label_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_last_updated_by_id.py +15 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_last_updated_by_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_limit.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_metadata.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_metadata_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_name.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_name_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_organization_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_blocks_item_organization_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_memory_prompt_template.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_message_ids.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_message_ids_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_metadata.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_metadata_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_organization_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_organization_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item.py +59 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_created_at.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_created_at_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_created_by_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_created_by_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_description.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_description_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config.py +60 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_azure_deployment.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_azure_deployment_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_azure_endpoint.py +15 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_azure_endpoint_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_azure_version.py +15 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_azure_version_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_embedding_chunk_size.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_embedding_chunk_size_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_embedding_endpoint.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_embedding_endpoint_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_embedding_endpoint_type.py +27 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_handle.py +15 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_embedding_config_handle_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_id.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_last_updated_by_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_last_updated_by_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_metadata.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_metadata_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_organization_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_organization_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_updated_at.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_sources_item_updated_at_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables.py +11 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item.py +61 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_created_at.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_created_at_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_created_by_id.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_created_by_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_description.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_description_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_id.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_last_updated_by_id.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_last_updated_by_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_organization_id.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_organization_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_updated_at.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_exec_environment_variables_item_updated_at_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item.py +10 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_output_mapping.py +36 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_output_mapping_default_child.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_output_mapping_default_child_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_output_mapping_require_output_mapping.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_child_output_mapping_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_children.py +24 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_children_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item.py +26 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_output_mapping.py +38 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_output_mapping_default_child.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_output_mapping_default_child_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_output_mapping_require_output_mapping.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_child_output_mapping_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_children.py +24 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_children_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item.py +22 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_child_output_mapping.py +38 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_child_output_mapping_default_child.py +17 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_child_output_mapping_default_child_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_child_output_mapping_require_output_mapping.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_child_output_mapping_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_children.py +24 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_children_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_one.py +23 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_one_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_two.py +23 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_item_two_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one.py +23 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_one_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_two.py +23 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_item_two_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_one.py +23 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_one_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_two.py +23 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tool_rules_item_two_type.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item.py +59 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_created_by_id.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_created_by_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_description.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_description_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_json_schema.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_json_schema_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_last_updated_by_id.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_last_updated_by_id_item.py +7 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_name.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_name_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_organization_id.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_organization_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_source_code.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_source_code_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_source_type.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_source_type_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_tool_type.py +8 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_updated_at.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_updated_at_item.py +5 -0
- letta_client/types/__init__.py +138 -6
- letta_client/types/action_model.py +6 -4
- letta_client/types/audio.py +19 -0
- letta_client/types/chat_completion_assistant_message_param.py +29 -0
- letta_client/types/chat_completion_assistant_message_param_content.py +8 -0
- letta_client/types/chat_completion_assistant_message_param_content_item.py +9 -0
- letta_client/types/chat_completion_audio_param.py +22 -0
- letta_client/types/chat_completion_audio_param_format.py +5 -0
- letta_client/types/chat_completion_audio_param_voice.py +7 -0
- letta_client/types/chat_completion_content_part_image_param.py +21 -0
- letta_client/types/chat_completion_content_part_input_audio_param.py +21 -0
- letta_client/types/chat_completion_content_part_refusal_param.py +20 -0
- letta_client/types/chat_completion_content_part_text_param.py +20 -0
- letta_client/types/chat_completion_developer_message_param.py +22 -0
- letta_client/types/chat_completion_developer_message_param_content.py +6 -0
- letta_client/types/chat_completion_function_call_option_param.py +19 -0
- letta_client/types/chat_completion_function_message_param.py +21 -0
- letta_client/types/chat_completion_message_tool_call_input.py +24 -0
- letta_client/types/{chat_completion_message_tool_call.py → chat_completion_message_tool_call_output.py} +3 -3
- letta_client/types/chat_completion_message_tool_call_param.py +24 -0
- letta_client/types/chat_completion_named_tool_choice_param.py +23 -0
- letta_client/types/chat_completion_prediction_content_param.py +21 -0
- letta_client/types/chat_completion_prediction_content_param_content.py +6 -0
- letta_client/types/chat_completion_stream_options_param.py +19 -0
- letta_client/types/chat_completion_system_message_param.py +22 -0
- letta_client/types/chat_completion_system_message_param_content.py +6 -0
- letta_client/types/chat_completion_tool_message_param.py +22 -0
- letta_client/types/chat_completion_tool_message_param_content.py +6 -0
- letta_client/types/chat_completion_tool_param.py +21 -0
- letta_client/types/chat_completion_user_message_param.py +22 -0
- letta_client/types/chat_completion_user_message_param_content.py +6 -0
- letta_client/types/chat_completion_user_message_param_content_item.py +10 -0
- letta_client/types/completion_create_params_non_streaming.py +62 -0
- letta_client/types/completion_create_params_non_streaming_function_call.py +8 -0
- letta_client/types/completion_create_params_non_streaming_messages_item.py +18 -0
- letta_client/types/completion_create_params_non_streaming_modalities_item.py +5 -0
- letta_client/types/completion_create_params_non_streaming_model.py +44 -0
- letta_client/types/completion_create_params_non_streaming_reasoning_effort.py +5 -0
- letta_client/types/completion_create_params_non_streaming_response_format.py +10 -0
- letta_client/types/completion_create_params_non_streaming_service_tier.py +5 -0
- letta_client/types/completion_create_params_non_streaming_stop.py +5 -0
- letta_client/types/completion_create_params_non_streaming_tool_choice.py +8 -0
- letta_client/types/completion_create_params_streaming.py +62 -0
- letta_client/types/completion_create_params_streaming_function_call.py +8 -0
- letta_client/types/completion_create_params_streaming_messages_item.py +18 -0
- letta_client/types/completion_create_params_streaming_modalities_item.py +5 -0
- letta_client/types/completion_create_params_streaming_model.py +44 -0
- letta_client/types/completion_create_params_streaming_reasoning_effort.py +5 -0
- letta_client/types/completion_create_params_streaming_response_format.py +10 -0
- letta_client/types/completion_create_params_streaming_service_tier.py +5 -0
- letta_client/types/completion_create_params_streaming_stop.py +5 -0
- letta_client/types/completion_create_params_streaming_tool_choice.py +8 -0
- letta_client/types/{function.py → function_call.py} +1 -1
- letta_client/types/{function_definition.py → function_definition_input.py} +1 -1
- letta_client/types/function_definition_output.py +22 -0
- letta_client/types/function_output.py +20 -0
- letta_client/types/function_tool.py +2 -2
- letta_client/types/image_url.py +21 -0
- letta_client/types/image_url_detail.py +5 -0
- letta_client/types/input_audio.py +21 -0
- letta_client/types/input_audio_format.py +5 -0
- letta_client/types/json_schema.py +26 -0
- letta_client/types/letta_request.py +12 -3
- letta_client/types/message.py +2 -2
- letta_client/types/openai_types_chat_chat_completion_message_tool_call_function.py +20 -0
- letta_client/types/openai_types_chat_chat_completion_message_tool_call_param_function.py +20 -0
- letta_client/types/openai_types_chat_chat_completion_named_tool_choice_param_function.py +19 -0
- letta_client/types/openai_types_chat_completion_create_params_function.py +21 -0
- letta_client/types/response_format_json_object.py +19 -0
- letta_client/types/response_format_json_schema.py +21 -0
- letta_client/types/response_format_text.py +19 -0
- {letta_client-0.1.22.dist-info → letta_client-0.1.23.dist-info}/METADATA +1 -1
- letta_client-0.1.23.dist-info/RECORD +408 -0
- letta_client/agents/messages/types/messages_list_response.py +0 -7
- letta_client-0.1.22.dist-info/RECORD +0 -179
- {letta_client-0.1.22.dist-info → letta_client-0.1.23.dist-info}/WHEEL +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
from ...core.client_wrapper import SyncClientWrapper
|
|
5
5
|
from ...core.request_options import RequestOptions
|
|
6
|
-
from
|
|
6
|
+
from ...types.letta_message_union import LettaMessageUnion
|
|
7
7
|
from ...core.jsonable_encoder import jsonable_encoder
|
|
8
8
|
from ...core.unchecked_base_model import construct_type
|
|
9
9
|
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
@@ -11,12 +11,11 @@ from ...types.http_validation_error import HttpValidationError
|
|
|
11
11
|
from json.decoder import JSONDecodeError
|
|
12
12
|
from ...core.api_error import ApiError
|
|
13
13
|
from ...types.message_create import MessageCreate
|
|
14
|
-
from ...types.letta_request_config import LettaRequestConfig
|
|
15
14
|
from ...types.letta_response import LettaResponse
|
|
16
15
|
from ...core.serialization import convert_and_respect_annotation_metadata
|
|
17
16
|
from ...types.message_role import MessageRole
|
|
18
17
|
from .types.message_update_content import MessageUpdateContent
|
|
19
|
-
from ...types.
|
|
18
|
+
from ...types.chat_completion_message_tool_call_input import ChatCompletionMessageToolCallInput
|
|
20
19
|
from ...types.message import Message
|
|
21
20
|
from .types.letta_streaming_response import LettaStreamingResponse
|
|
22
21
|
import httpx_sse
|
|
@@ -39,11 +38,11 @@ class MessagesClient:
|
|
|
39
38
|
after: typing.Optional[str] = None,
|
|
40
39
|
before: typing.Optional[str] = None,
|
|
41
40
|
limit: typing.Optional[int] = None,
|
|
42
|
-
|
|
41
|
+
use_assistant_message: typing.Optional[bool] = None,
|
|
43
42
|
assistant_message_tool_name: typing.Optional[str] = None,
|
|
44
43
|
assistant_message_tool_kwarg: typing.Optional[str] = None,
|
|
45
44
|
request_options: typing.Optional[RequestOptions] = None,
|
|
46
|
-
) ->
|
|
45
|
+
) -> typing.List[LettaMessageUnion]:
|
|
47
46
|
"""
|
|
48
47
|
Retrieve message history for an agent.
|
|
49
48
|
|
|
@@ -60,21 +59,21 @@ class MessagesClient:
|
|
|
60
59
|
limit : typing.Optional[int]
|
|
61
60
|
Maximum number of messages to retrieve.
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
use_assistant_message : typing.Optional[bool]
|
|
63
|
+
Whether to use assistant messages
|
|
65
64
|
|
|
66
65
|
assistant_message_tool_name : typing.Optional[str]
|
|
67
66
|
The name of the designated message tool.
|
|
68
67
|
|
|
69
68
|
assistant_message_tool_kwarg : typing.Optional[str]
|
|
70
|
-
The name of the message argument
|
|
69
|
+
The name of the message argument.
|
|
71
70
|
|
|
72
71
|
request_options : typing.Optional[RequestOptions]
|
|
73
72
|
Request-specific configuration.
|
|
74
73
|
|
|
75
74
|
Returns
|
|
76
75
|
-------
|
|
77
|
-
|
|
76
|
+
typing.List[LettaMessageUnion]
|
|
78
77
|
Successful Response
|
|
79
78
|
|
|
80
79
|
Examples
|
|
@@ -95,7 +94,7 @@ class MessagesClient:
|
|
|
95
94
|
"after": after,
|
|
96
95
|
"before": before,
|
|
97
96
|
"limit": limit,
|
|
98
|
-
"
|
|
97
|
+
"use_assistant_message": use_assistant_message,
|
|
99
98
|
"assistant_message_tool_name": assistant_message_tool_name,
|
|
100
99
|
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
101
100
|
},
|
|
@@ -104,9 +103,9 @@ class MessagesClient:
|
|
|
104
103
|
try:
|
|
105
104
|
if 200 <= _response.status_code < 300:
|
|
106
105
|
return typing.cast(
|
|
107
|
-
|
|
106
|
+
typing.List[LettaMessageUnion],
|
|
108
107
|
construct_type(
|
|
109
|
-
type_=
|
|
108
|
+
type_=typing.List[LettaMessageUnion], # type: ignore
|
|
110
109
|
object_=_response.json(),
|
|
111
110
|
),
|
|
112
111
|
)
|
|
@@ -130,7 +129,9 @@ class MessagesClient:
|
|
|
130
129
|
agent_id: str,
|
|
131
130
|
*,
|
|
132
131
|
messages: typing.Sequence[MessageCreate],
|
|
133
|
-
|
|
132
|
+
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
133
|
+
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
134
|
+
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
134
135
|
request_options: typing.Optional[RequestOptions] = None,
|
|
135
136
|
) -> LettaResponse:
|
|
136
137
|
"""
|
|
@@ -144,8 +145,14 @@ class MessagesClient:
|
|
|
144
145
|
messages : typing.Sequence[MessageCreate]
|
|
145
146
|
The messages to be sent to the agent.
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
use_assistant_message : typing.Optional[bool]
|
|
149
|
+
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
150
|
+
|
|
151
|
+
assistant_message_tool_name : typing.Optional[str]
|
|
152
|
+
The name of the designated message tool.
|
|
153
|
+
|
|
154
|
+
assistant_message_tool_kwarg : typing.Optional[str]
|
|
155
|
+
The name of the message argument in the designated message tool.
|
|
149
156
|
|
|
150
157
|
request_options : typing.Optional[RequestOptions]
|
|
151
158
|
Request-specific configuration.
|
|
@@ -179,9 +186,9 @@ class MessagesClient:
|
|
|
179
186
|
"messages": convert_and_respect_annotation_metadata(
|
|
180
187
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
181
188
|
),
|
|
182
|
-
"
|
|
183
|
-
|
|
184
|
-
|
|
189
|
+
"use_assistant_message": use_assistant_message,
|
|
190
|
+
"assistant_message_tool_name": assistant_message_tool_name,
|
|
191
|
+
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
185
192
|
},
|
|
186
193
|
request_options=request_options,
|
|
187
194
|
omit=OMIT,
|
|
@@ -218,7 +225,7 @@ class MessagesClient:
|
|
|
218
225
|
role: typing.Optional[MessageRole] = OMIT,
|
|
219
226
|
content: typing.Optional[MessageUpdateContent] = OMIT,
|
|
220
227
|
name: typing.Optional[str] = OMIT,
|
|
221
|
-
tool_calls: typing.Optional[typing.Sequence[
|
|
228
|
+
tool_calls: typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]] = OMIT,
|
|
222
229
|
tool_call_id: typing.Optional[str] = OMIT,
|
|
223
230
|
request_options: typing.Optional[RequestOptions] = None,
|
|
224
231
|
) -> Message:
|
|
@@ -240,7 +247,7 @@ class MessagesClient:
|
|
|
240
247
|
name : typing.Optional[str]
|
|
241
248
|
The name of the participant.
|
|
242
249
|
|
|
243
|
-
tool_calls : typing.Optional[typing.Sequence[
|
|
250
|
+
tool_calls : typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]]
|
|
244
251
|
The list of tool calls requested.
|
|
245
252
|
|
|
246
253
|
tool_call_id : typing.Optional[str]
|
|
@@ -276,7 +283,9 @@ class MessagesClient:
|
|
|
276
283
|
),
|
|
277
284
|
"name": name,
|
|
278
285
|
"tool_calls": convert_and_respect_annotation_metadata(
|
|
279
|
-
object_=tool_calls,
|
|
286
|
+
object_=tool_calls,
|
|
287
|
+
annotation=typing.Sequence[ChatCompletionMessageToolCallInput],
|
|
288
|
+
direction="write",
|
|
280
289
|
),
|
|
281
290
|
"tool_call_id": tool_call_id,
|
|
282
291
|
},
|
|
@@ -315,7 +324,9 @@ class MessagesClient:
|
|
|
315
324
|
agent_id: str,
|
|
316
325
|
*,
|
|
317
326
|
messages: typing.Sequence[MessageCreate],
|
|
318
|
-
|
|
327
|
+
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
328
|
+
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
329
|
+
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
319
330
|
stream_tokens: typing.Optional[bool] = OMIT,
|
|
320
331
|
request_options: typing.Optional[RequestOptions] = None,
|
|
321
332
|
) -> typing.Iterator[LettaStreamingResponse]:
|
|
@@ -331,8 +342,14 @@ class MessagesClient:
|
|
|
331
342
|
messages : typing.Sequence[MessageCreate]
|
|
332
343
|
The messages to be sent to the agent.
|
|
333
344
|
|
|
334
|
-
|
|
335
|
-
|
|
345
|
+
use_assistant_message : typing.Optional[bool]
|
|
346
|
+
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
347
|
+
|
|
348
|
+
assistant_message_tool_name : typing.Optional[str]
|
|
349
|
+
The name of the designated message tool.
|
|
350
|
+
|
|
351
|
+
assistant_message_tool_kwarg : typing.Optional[str]
|
|
352
|
+
The name of the message argument in the designated message tool.
|
|
336
353
|
|
|
337
354
|
stream_tokens : typing.Optional[bool]
|
|
338
355
|
Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).
|
|
@@ -371,9 +388,9 @@ class MessagesClient:
|
|
|
371
388
|
"messages": convert_and_respect_annotation_metadata(
|
|
372
389
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
373
390
|
),
|
|
374
|
-
"
|
|
375
|
-
|
|
376
|
-
|
|
391
|
+
"use_assistant_message": use_assistant_message,
|
|
392
|
+
"assistant_message_tool_name": assistant_message_tool_name,
|
|
393
|
+
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
377
394
|
"stream_tokens": stream_tokens,
|
|
378
395
|
},
|
|
379
396
|
headers={
|
|
@@ -418,7 +435,9 @@ class MessagesClient:
|
|
|
418
435
|
agent_id: str,
|
|
419
436
|
*,
|
|
420
437
|
messages: typing.Sequence[MessageCreate],
|
|
421
|
-
|
|
438
|
+
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
439
|
+
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
440
|
+
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
422
441
|
request_options: typing.Optional[RequestOptions] = None,
|
|
423
442
|
) -> Run:
|
|
424
443
|
"""
|
|
@@ -432,8 +451,14 @@ class MessagesClient:
|
|
|
432
451
|
messages : typing.Sequence[MessageCreate]
|
|
433
452
|
The messages to be sent to the agent.
|
|
434
453
|
|
|
435
|
-
|
|
436
|
-
|
|
454
|
+
use_assistant_message : typing.Optional[bool]
|
|
455
|
+
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
456
|
+
|
|
457
|
+
assistant_message_tool_name : typing.Optional[str]
|
|
458
|
+
The name of the designated message tool.
|
|
459
|
+
|
|
460
|
+
assistant_message_tool_kwarg : typing.Optional[str]
|
|
461
|
+
The name of the message argument in the designated message tool.
|
|
437
462
|
|
|
438
463
|
request_options : typing.Optional[RequestOptions]
|
|
439
464
|
Request-specific configuration.
|
|
@@ -467,9 +492,9 @@ class MessagesClient:
|
|
|
467
492
|
"messages": convert_and_respect_annotation_metadata(
|
|
468
493
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
469
494
|
),
|
|
470
|
-
"
|
|
471
|
-
|
|
472
|
-
|
|
495
|
+
"use_assistant_message": use_assistant_message,
|
|
496
|
+
"assistant_message_tool_name": assistant_message_tool_name,
|
|
497
|
+
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
473
498
|
},
|
|
474
499
|
request_options=request_options,
|
|
475
500
|
omit=OMIT,
|
|
@@ -510,11 +535,11 @@ class AsyncMessagesClient:
|
|
|
510
535
|
after: typing.Optional[str] = None,
|
|
511
536
|
before: typing.Optional[str] = None,
|
|
512
537
|
limit: typing.Optional[int] = None,
|
|
513
|
-
|
|
538
|
+
use_assistant_message: typing.Optional[bool] = None,
|
|
514
539
|
assistant_message_tool_name: typing.Optional[str] = None,
|
|
515
540
|
assistant_message_tool_kwarg: typing.Optional[str] = None,
|
|
516
541
|
request_options: typing.Optional[RequestOptions] = None,
|
|
517
|
-
) ->
|
|
542
|
+
) -> typing.List[LettaMessageUnion]:
|
|
518
543
|
"""
|
|
519
544
|
Retrieve message history for an agent.
|
|
520
545
|
|
|
@@ -531,21 +556,21 @@ class AsyncMessagesClient:
|
|
|
531
556
|
limit : typing.Optional[int]
|
|
532
557
|
Maximum number of messages to retrieve.
|
|
533
558
|
|
|
534
|
-
|
|
535
|
-
|
|
559
|
+
use_assistant_message : typing.Optional[bool]
|
|
560
|
+
Whether to use assistant messages
|
|
536
561
|
|
|
537
562
|
assistant_message_tool_name : typing.Optional[str]
|
|
538
563
|
The name of the designated message tool.
|
|
539
564
|
|
|
540
565
|
assistant_message_tool_kwarg : typing.Optional[str]
|
|
541
|
-
The name of the message argument
|
|
566
|
+
The name of the message argument.
|
|
542
567
|
|
|
543
568
|
request_options : typing.Optional[RequestOptions]
|
|
544
569
|
Request-specific configuration.
|
|
545
570
|
|
|
546
571
|
Returns
|
|
547
572
|
-------
|
|
548
|
-
|
|
573
|
+
typing.List[LettaMessageUnion]
|
|
549
574
|
Successful Response
|
|
550
575
|
|
|
551
576
|
Examples
|
|
@@ -574,7 +599,7 @@ class AsyncMessagesClient:
|
|
|
574
599
|
"after": after,
|
|
575
600
|
"before": before,
|
|
576
601
|
"limit": limit,
|
|
577
|
-
"
|
|
602
|
+
"use_assistant_message": use_assistant_message,
|
|
578
603
|
"assistant_message_tool_name": assistant_message_tool_name,
|
|
579
604
|
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
580
605
|
},
|
|
@@ -583,9 +608,9 @@ class AsyncMessagesClient:
|
|
|
583
608
|
try:
|
|
584
609
|
if 200 <= _response.status_code < 300:
|
|
585
610
|
return typing.cast(
|
|
586
|
-
|
|
611
|
+
typing.List[LettaMessageUnion],
|
|
587
612
|
construct_type(
|
|
588
|
-
type_=
|
|
613
|
+
type_=typing.List[LettaMessageUnion], # type: ignore
|
|
589
614
|
object_=_response.json(),
|
|
590
615
|
),
|
|
591
616
|
)
|
|
@@ -609,7 +634,9 @@ class AsyncMessagesClient:
|
|
|
609
634
|
agent_id: str,
|
|
610
635
|
*,
|
|
611
636
|
messages: typing.Sequence[MessageCreate],
|
|
612
|
-
|
|
637
|
+
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
638
|
+
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
639
|
+
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
613
640
|
request_options: typing.Optional[RequestOptions] = None,
|
|
614
641
|
) -> LettaResponse:
|
|
615
642
|
"""
|
|
@@ -623,8 +650,14 @@ class AsyncMessagesClient:
|
|
|
623
650
|
messages : typing.Sequence[MessageCreate]
|
|
624
651
|
The messages to be sent to the agent.
|
|
625
652
|
|
|
626
|
-
|
|
627
|
-
|
|
653
|
+
use_assistant_message : typing.Optional[bool]
|
|
654
|
+
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
655
|
+
|
|
656
|
+
assistant_message_tool_name : typing.Optional[str]
|
|
657
|
+
The name of the designated message tool.
|
|
658
|
+
|
|
659
|
+
assistant_message_tool_kwarg : typing.Optional[str]
|
|
660
|
+
The name of the message argument in the designated message tool.
|
|
628
661
|
|
|
629
662
|
request_options : typing.Optional[RequestOptions]
|
|
630
663
|
Request-specific configuration.
|
|
@@ -666,9 +699,9 @@ class AsyncMessagesClient:
|
|
|
666
699
|
"messages": convert_and_respect_annotation_metadata(
|
|
667
700
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
668
701
|
),
|
|
669
|
-
"
|
|
670
|
-
|
|
671
|
-
|
|
702
|
+
"use_assistant_message": use_assistant_message,
|
|
703
|
+
"assistant_message_tool_name": assistant_message_tool_name,
|
|
704
|
+
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
672
705
|
},
|
|
673
706
|
request_options=request_options,
|
|
674
707
|
omit=OMIT,
|
|
@@ -705,7 +738,7 @@ class AsyncMessagesClient:
|
|
|
705
738
|
role: typing.Optional[MessageRole] = OMIT,
|
|
706
739
|
content: typing.Optional[MessageUpdateContent] = OMIT,
|
|
707
740
|
name: typing.Optional[str] = OMIT,
|
|
708
|
-
tool_calls: typing.Optional[typing.Sequence[
|
|
741
|
+
tool_calls: typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]] = OMIT,
|
|
709
742
|
tool_call_id: typing.Optional[str] = OMIT,
|
|
710
743
|
request_options: typing.Optional[RequestOptions] = None,
|
|
711
744
|
) -> Message:
|
|
@@ -727,7 +760,7 @@ class AsyncMessagesClient:
|
|
|
727
760
|
name : typing.Optional[str]
|
|
728
761
|
The name of the participant.
|
|
729
762
|
|
|
730
|
-
tool_calls : typing.Optional[typing.Sequence[
|
|
763
|
+
tool_calls : typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]]
|
|
731
764
|
The list of tool calls requested.
|
|
732
765
|
|
|
733
766
|
tool_call_id : typing.Optional[str]
|
|
@@ -771,7 +804,9 @@ class AsyncMessagesClient:
|
|
|
771
804
|
),
|
|
772
805
|
"name": name,
|
|
773
806
|
"tool_calls": convert_and_respect_annotation_metadata(
|
|
774
|
-
object_=tool_calls,
|
|
807
|
+
object_=tool_calls,
|
|
808
|
+
annotation=typing.Sequence[ChatCompletionMessageToolCallInput],
|
|
809
|
+
direction="write",
|
|
775
810
|
),
|
|
776
811
|
"tool_call_id": tool_call_id,
|
|
777
812
|
},
|
|
@@ -810,7 +845,9 @@ class AsyncMessagesClient:
|
|
|
810
845
|
agent_id: str,
|
|
811
846
|
*,
|
|
812
847
|
messages: typing.Sequence[MessageCreate],
|
|
813
|
-
|
|
848
|
+
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
849
|
+
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
850
|
+
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
814
851
|
stream_tokens: typing.Optional[bool] = OMIT,
|
|
815
852
|
request_options: typing.Optional[RequestOptions] = None,
|
|
816
853
|
) -> typing.AsyncIterator[LettaStreamingResponse]:
|
|
@@ -826,8 +863,14 @@ class AsyncMessagesClient:
|
|
|
826
863
|
messages : typing.Sequence[MessageCreate]
|
|
827
864
|
The messages to be sent to the agent.
|
|
828
865
|
|
|
829
|
-
|
|
830
|
-
|
|
866
|
+
use_assistant_message : typing.Optional[bool]
|
|
867
|
+
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
868
|
+
|
|
869
|
+
assistant_message_tool_name : typing.Optional[str]
|
|
870
|
+
The name of the designated message tool.
|
|
871
|
+
|
|
872
|
+
assistant_message_tool_kwarg : typing.Optional[str]
|
|
873
|
+
The name of the message argument in the designated message tool.
|
|
831
874
|
|
|
832
875
|
stream_tokens : typing.Optional[bool]
|
|
833
876
|
Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).
|
|
@@ -874,9 +917,9 @@ class AsyncMessagesClient:
|
|
|
874
917
|
"messages": convert_and_respect_annotation_metadata(
|
|
875
918
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
876
919
|
),
|
|
877
|
-
"
|
|
878
|
-
|
|
879
|
-
|
|
920
|
+
"use_assistant_message": use_assistant_message,
|
|
921
|
+
"assistant_message_tool_name": assistant_message_tool_name,
|
|
922
|
+
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
880
923
|
"stream_tokens": stream_tokens,
|
|
881
924
|
},
|
|
882
925
|
headers={
|
|
@@ -921,7 +964,9 @@ class AsyncMessagesClient:
|
|
|
921
964
|
agent_id: str,
|
|
922
965
|
*,
|
|
923
966
|
messages: typing.Sequence[MessageCreate],
|
|
924
|
-
|
|
967
|
+
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
968
|
+
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
969
|
+
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
925
970
|
request_options: typing.Optional[RequestOptions] = None,
|
|
926
971
|
) -> Run:
|
|
927
972
|
"""
|
|
@@ -935,8 +980,14 @@ class AsyncMessagesClient:
|
|
|
935
980
|
messages : typing.Sequence[MessageCreate]
|
|
936
981
|
The messages to be sent to the agent.
|
|
937
982
|
|
|
938
|
-
|
|
939
|
-
|
|
983
|
+
use_assistant_message : typing.Optional[bool]
|
|
984
|
+
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
985
|
+
|
|
986
|
+
assistant_message_tool_name : typing.Optional[str]
|
|
987
|
+
The name of the designated message tool.
|
|
988
|
+
|
|
989
|
+
assistant_message_tool_kwarg : typing.Optional[str]
|
|
990
|
+
The name of the message argument in the designated message tool.
|
|
940
991
|
|
|
941
992
|
request_options : typing.Optional[RequestOptions]
|
|
942
993
|
Request-specific configuration.
|
|
@@ -978,9 +1029,9 @@ class AsyncMessagesClient:
|
|
|
978
1029
|
"messages": convert_and_respect_annotation_metadata(
|
|
979
1030
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
980
1031
|
),
|
|
981
|
-
"
|
|
982
|
-
|
|
983
|
-
|
|
1032
|
+
"use_assistant_message": use_assistant_message,
|
|
1033
|
+
"assistant_message_tool_name": assistant_message_tool_name,
|
|
1034
|
+
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
984
1035
|
},
|
|
985
1036
|
request_options=request_options,
|
|
986
1037
|
omit=OMIT,
|
|
@@ -2,6 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
from .letta_streaming_response import LettaStreamingResponse
|
|
4
4
|
from .message_update_content import MessageUpdateContent
|
|
5
|
-
from .messages_list_response import MessagesListResponse
|
|
6
5
|
|
|
7
|
-
__all__ = ["LettaStreamingResponse", "MessageUpdateContent"
|
|
6
|
+
__all__ = ["LettaStreamingResponse", "MessageUpdateContent"]
|
letta_client/base_client.py
CHANGED
|
@@ -14,6 +14,7 @@ from .health.client import HealthClient
|
|
|
14
14
|
from .providers.client import ProvidersClient
|
|
15
15
|
from .runs.client import RunsClient
|
|
16
16
|
from .tag.client import TagClient
|
|
17
|
+
from .templates.client import TemplatesClient
|
|
17
18
|
from .core.client_wrapper import AsyncClientWrapper
|
|
18
19
|
from .tools.client import AsyncToolsClient
|
|
19
20
|
from .sources.client import AsyncSourcesClient
|
|
@@ -25,6 +26,7 @@ from .health.client import AsyncHealthClient
|
|
|
25
26
|
from .providers.client import AsyncProvidersClient
|
|
26
27
|
from .runs.client import AsyncRunsClient
|
|
27
28
|
from .tag.client import AsyncTagClient
|
|
29
|
+
from .templates.client import AsyncTemplatesClient
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
class LettaBase:
|
|
@@ -95,6 +97,7 @@ class LettaBase:
|
|
|
95
97
|
self.providers = ProvidersClient(client_wrapper=self._client_wrapper)
|
|
96
98
|
self.runs = RunsClient(client_wrapper=self._client_wrapper)
|
|
97
99
|
self.tag = TagClient(client_wrapper=self._client_wrapper)
|
|
100
|
+
self.templates = TemplatesClient(client_wrapper=self._client_wrapper)
|
|
98
101
|
|
|
99
102
|
|
|
100
103
|
class AsyncLettaBase:
|
|
@@ -165,6 +168,7 @@ class AsyncLettaBase:
|
|
|
165
168
|
self.providers = AsyncProvidersClient(client_wrapper=self._client_wrapper)
|
|
166
169
|
self.runs = AsyncRunsClient(client_wrapper=self._client_wrapper)
|
|
167
170
|
self.tag = AsyncTagClient(client_wrapper=self._client_wrapper)
|
|
171
|
+
self.templates = AsyncTemplatesClient(client_wrapper=self._client_wrapper)
|
|
168
172
|
|
|
169
173
|
|
|
170
174
|
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: LettaEnvironment) -> str:
|
|
@@ -16,7 +16,7 @@ class BaseClientWrapper:
|
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
|
17
17
|
"X-Fern-Language": "Python",
|
|
18
18
|
"X-Fern-SDK-Name": "letta-client",
|
|
19
|
-
"X-Fern-SDK-Version": "0.1.
|
|
19
|
+
"X-Fern-SDK-Version": "0.1.23",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|