letta-client 0.1.21__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 +124 -63
- letta_client/agents/messages/types/__init__.py +1 -2
- letta_client/base_client.py +4 -0
- letta_client/client.py +0 -4
- 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/tools/client.py +0 -30
- 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/types/tool_create.py +0 -5
- {letta_client-0.1.21.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.21.dist-info/RECORD +0 -179
- {letta_client-0.1.21.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
|
|
@@ -36,13 +35,14 @@ class MessagesClient:
|
|
|
36
35
|
self,
|
|
37
36
|
agent_id: str,
|
|
38
37
|
*,
|
|
38
|
+
after: typing.Optional[str] = None,
|
|
39
39
|
before: typing.Optional[str] = None,
|
|
40
40
|
limit: typing.Optional[int] = None,
|
|
41
|
-
|
|
41
|
+
use_assistant_message: typing.Optional[bool] = None,
|
|
42
42
|
assistant_message_tool_name: typing.Optional[str] = None,
|
|
43
43
|
assistant_message_tool_kwarg: typing.Optional[str] = None,
|
|
44
44
|
request_options: typing.Optional[RequestOptions] = None,
|
|
45
|
-
) ->
|
|
45
|
+
) -> typing.List[LettaMessageUnion]:
|
|
46
46
|
"""
|
|
47
47
|
Retrieve message history for an agent.
|
|
48
48
|
|
|
@@ -50,27 +50,30 @@ class MessagesClient:
|
|
|
50
50
|
----------
|
|
51
51
|
agent_id : str
|
|
52
52
|
|
|
53
|
+
after : typing.Optional[str]
|
|
54
|
+
Message after which to retrieve the returned messages.
|
|
55
|
+
|
|
53
56
|
before : typing.Optional[str]
|
|
54
57
|
Message before which to retrieve the returned messages.
|
|
55
58
|
|
|
56
59
|
limit : typing.Optional[int]
|
|
57
60
|
Maximum number of messages to retrieve.
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
use_assistant_message : typing.Optional[bool]
|
|
63
|
+
Whether to use assistant messages
|
|
61
64
|
|
|
62
65
|
assistant_message_tool_name : typing.Optional[str]
|
|
63
66
|
The name of the designated message tool.
|
|
64
67
|
|
|
65
68
|
assistant_message_tool_kwarg : typing.Optional[str]
|
|
66
|
-
The name of the message argument
|
|
69
|
+
The name of the message argument.
|
|
67
70
|
|
|
68
71
|
request_options : typing.Optional[RequestOptions]
|
|
69
72
|
Request-specific configuration.
|
|
70
73
|
|
|
71
74
|
Returns
|
|
72
75
|
-------
|
|
73
|
-
|
|
76
|
+
typing.List[LettaMessageUnion]
|
|
74
77
|
Successful Response
|
|
75
78
|
|
|
76
79
|
Examples
|
|
@@ -88,9 +91,10 @@ class MessagesClient:
|
|
|
88
91
|
f"v1/agents/{jsonable_encoder(agent_id)}/messages",
|
|
89
92
|
method="GET",
|
|
90
93
|
params={
|
|
94
|
+
"after": after,
|
|
91
95
|
"before": before,
|
|
92
96
|
"limit": limit,
|
|
93
|
-
"
|
|
97
|
+
"use_assistant_message": use_assistant_message,
|
|
94
98
|
"assistant_message_tool_name": assistant_message_tool_name,
|
|
95
99
|
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
96
100
|
},
|
|
@@ -99,9 +103,9 @@ class MessagesClient:
|
|
|
99
103
|
try:
|
|
100
104
|
if 200 <= _response.status_code < 300:
|
|
101
105
|
return typing.cast(
|
|
102
|
-
|
|
106
|
+
typing.List[LettaMessageUnion],
|
|
103
107
|
construct_type(
|
|
104
|
-
type_=
|
|
108
|
+
type_=typing.List[LettaMessageUnion], # type: ignore
|
|
105
109
|
object_=_response.json(),
|
|
106
110
|
),
|
|
107
111
|
)
|
|
@@ -125,7 +129,9 @@ class MessagesClient:
|
|
|
125
129
|
agent_id: str,
|
|
126
130
|
*,
|
|
127
131
|
messages: typing.Sequence[MessageCreate],
|
|
128
|
-
|
|
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,
|
|
129
135
|
request_options: typing.Optional[RequestOptions] = None,
|
|
130
136
|
) -> LettaResponse:
|
|
131
137
|
"""
|
|
@@ -139,8 +145,14 @@ class MessagesClient:
|
|
|
139
145
|
messages : typing.Sequence[MessageCreate]
|
|
140
146
|
The messages to be sent to the agent.
|
|
141
147
|
|
|
142
|
-
|
|
143
|
-
|
|
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.
|
|
144
156
|
|
|
145
157
|
request_options : typing.Optional[RequestOptions]
|
|
146
158
|
Request-specific configuration.
|
|
@@ -174,9 +186,9 @@ class MessagesClient:
|
|
|
174
186
|
"messages": convert_and_respect_annotation_metadata(
|
|
175
187
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
176
188
|
),
|
|
177
|
-
"
|
|
178
|
-
|
|
179
|
-
|
|
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,
|
|
180
192
|
},
|
|
181
193
|
request_options=request_options,
|
|
182
194
|
omit=OMIT,
|
|
@@ -213,7 +225,7 @@ class MessagesClient:
|
|
|
213
225
|
role: typing.Optional[MessageRole] = OMIT,
|
|
214
226
|
content: typing.Optional[MessageUpdateContent] = OMIT,
|
|
215
227
|
name: typing.Optional[str] = OMIT,
|
|
216
|
-
tool_calls: typing.Optional[typing.Sequence[
|
|
228
|
+
tool_calls: typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]] = OMIT,
|
|
217
229
|
tool_call_id: typing.Optional[str] = OMIT,
|
|
218
230
|
request_options: typing.Optional[RequestOptions] = None,
|
|
219
231
|
) -> Message:
|
|
@@ -235,7 +247,7 @@ class MessagesClient:
|
|
|
235
247
|
name : typing.Optional[str]
|
|
236
248
|
The name of the participant.
|
|
237
249
|
|
|
238
|
-
tool_calls : typing.Optional[typing.Sequence[
|
|
250
|
+
tool_calls : typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]]
|
|
239
251
|
The list of tool calls requested.
|
|
240
252
|
|
|
241
253
|
tool_call_id : typing.Optional[str]
|
|
@@ -271,7 +283,9 @@ class MessagesClient:
|
|
|
271
283
|
),
|
|
272
284
|
"name": name,
|
|
273
285
|
"tool_calls": convert_and_respect_annotation_metadata(
|
|
274
|
-
object_=tool_calls,
|
|
286
|
+
object_=tool_calls,
|
|
287
|
+
annotation=typing.Sequence[ChatCompletionMessageToolCallInput],
|
|
288
|
+
direction="write",
|
|
275
289
|
),
|
|
276
290
|
"tool_call_id": tool_call_id,
|
|
277
291
|
},
|
|
@@ -310,7 +324,9 @@ class MessagesClient:
|
|
|
310
324
|
agent_id: str,
|
|
311
325
|
*,
|
|
312
326
|
messages: typing.Sequence[MessageCreate],
|
|
313
|
-
|
|
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,
|
|
314
330
|
stream_tokens: typing.Optional[bool] = OMIT,
|
|
315
331
|
request_options: typing.Optional[RequestOptions] = None,
|
|
316
332
|
) -> typing.Iterator[LettaStreamingResponse]:
|
|
@@ -326,8 +342,14 @@ class MessagesClient:
|
|
|
326
342
|
messages : typing.Sequence[MessageCreate]
|
|
327
343
|
The messages to be sent to the agent.
|
|
328
344
|
|
|
329
|
-
|
|
330
|
-
|
|
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.
|
|
331
353
|
|
|
332
354
|
stream_tokens : typing.Optional[bool]
|
|
333
355
|
Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).
|
|
@@ -366,9 +388,9 @@ class MessagesClient:
|
|
|
366
388
|
"messages": convert_and_respect_annotation_metadata(
|
|
367
389
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
368
390
|
),
|
|
369
|
-
"
|
|
370
|
-
|
|
371
|
-
|
|
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,
|
|
372
394
|
"stream_tokens": stream_tokens,
|
|
373
395
|
},
|
|
374
396
|
headers={
|
|
@@ -413,7 +435,9 @@ class MessagesClient:
|
|
|
413
435
|
agent_id: str,
|
|
414
436
|
*,
|
|
415
437
|
messages: typing.Sequence[MessageCreate],
|
|
416
|
-
|
|
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,
|
|
417
441
|
request_options: typing.Optional[RequestOptions] = None,
|
|
418
442
|
) -> Run:
|
|
419
443
|
"""
|
|
@@ -427,8 +451,14 @@ class MessagesClient:
|
|
|
427
451
|
messages : typing.Sequence[MessageCreate]
|
|
428
452
|
The messages to be sent to the agent.
|
|
429
453
|
|
|
430
|
-
|
|
431
|
-
|
|
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.
|
|
432
462
|
|
|
433
463
|
request_options : typing.Optional[RequestOptions]
|
|
434
464
|
Request-specific configuration.
|
|
@@ -462,9 +492,9 @@ class MessagesClient:
|
|
|
462
492
|
"messages": convert_and_respect_annotation_metadata(
|
|
463
493
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
464
494
|
),
|
|
465
|
-
"
|
|
466
|
-
|
|
467
|
-
|
|
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,
|
|
468
498
|
},
|
|
469
499
|
request_options=request_options,
|
|
470
500
|
omit=OMIT,
|
|
@@ -502,13 +532,14 @@ class AsyncMessagesClient:
|
|
|
502
532
|
self,
|
|
503
533
|
agent_id: str,
|
|
504
534
|
*,
|
|
535
|
+
after: typing.Optional[str] = None,
|
|
505
536
|
before: typing.Optional[str] = None,
|
|
506
537
|
limit: typing.Optional[int] = None,
|
|
507
|
-
|
|
538
|
+
use_assistant_message: typing.Optional[bool] = None,
|
|
508
539
|
assistant_message_tool_name: typing.Optional[str] = None,
|
|
509
540
|
assistant_message_tool_kwarg: typing.Optional[str] = None,
|
|
510
541
|
request_options: typing.Optional[RequestOptions] = None,
|
|
511
|
-
) ->
|
|
542
|
+
) -> typing.List[LettaMessageUnion]:
|
|
512
543
|
"""
|
|
513
544
|
Retrieve message history for an agent.
|
|
514
545
|
|
|
@@ -516,27 +547,30 @@ class AsyncMessagesClient:
|
|
|
516
547
|
----------
|
|
517
548
|
agent_id : str
|
|
518
549
|
|
|
550
|
+
after : typing.Optional[str]
|
|
551
|
+
Message after which to retrieve the returned messages.
|
|
552
|
+
|
|
519
553
|
before : typing.Optional[str]
|
|
520
554
|
Message before which to retrieve the returned messages.
|
|
521
555
|
|
|
522
556
|
limit : typing.Optional[int]
|
|
523
557
|
Maximum number of messages to retrieve.
|
|
524
558
|
|
|
525
|
-
|
|
526
|
-
|
|
559
|
+
use_assistant_message : typing.Optional[bool]
|
|
560
|
+
Whether to use assistant messages
|
|
527
561
|
|
|
528
562
|
assistant_message_tool_name : typing.Optional[str]
|
|
529
563
|
The name of the designated message tool.
|
|
530
564
|
|
|
531
565
|
assistant_message_tool_kwarg : typing.Optional[str]
|
|
532
|
-
The name of the message argument
|
|
566
|
+
The name of the message argument.
|
|
533
567
|
|
|
534
568
|
request_options : typing.Optional[RequestOptions]
|
|
535
569
|
Request-specific configuration.
|
|
536
570
|
|
|
537
571
|
Returns
|
|
538
572
|
-------
|
|
539
|
-
|
|
573
|
+
typing.List[LettaMessageUnion]
|
|
540
574
|
Successful Response
|
|
541
575
|
|
|
542
576
|
Examples
|
|
@@ -562,9 +596,10 @@ class AsyncMessagesClient:
|
|
|
562
596
|
f"v1/agents/{jsonable_encoder(agent_id)}/messages",
|
|
563
597
|
method="GET",
|
|
564
598
|
params={
|
|
599
|
+
"after": after,
|
|
565
600
|
"before": before,
|
|
566
601
|
"limit": limit,
|
|
567
|
-
"
|
|
602
|
+
"use_assistant_message": use_assistant_message,
|
|
568
603
|
"assistant_message_tool_name": assistant_message_tool_name,
|
|
569
604
|
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
570
605
|
},
|
|
@@ -573,9 +608,9 @@ class AsyncMessagesClient:
|
|
|
573
608
|
try:
|
|
574
609
|
if 200 <= _response.status_code < 300:
|
|
575
610
|
return typing.cast(
|
|
576
|
-
|
|
611
|
+
typing.List[LettaMessageUnion],
|
|
577
612
|
construct_type(
|
|
578
|
-
type_=
|
|
613
|
+
type_=typing.List[LettaMessageUnion], # type: ignore
|
|
579
614
|
object_=_response.json(),
|
|
580
615
|
),
|
|
581
616
|
)
|
|
@@ -599,7 +634,9 @@ class AsyncMessagesClient:
|
|
|
599
634
|
agent_id: str,
|
|
600
635
|
*,
|
|
601
636
|
messages: typing.Sequence[MessageCreate],
|
|
602
|
-
|
|
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,
|
|
603
640
|
request_options: typing.Optional[RequestOptions] = None,
|
|
604
641
|
) -> LettaResponse:
|
|
605
642
|
"""
|
|
@@ -613,8 +650,14 @@ class AsyncMessagesClient:
|
|
|
613
650
|
messages : typing.Sequence[MessageCreate]
|
|
614
651
|
The messages to be sent to the agent.
|
|
615
652
|
|
|
616
|
-
|
|
617
|
-
|
|
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.
|
|
618
661
|
|
|
619
662
|
request_options : typing.Optional[RequestOptions]
|
|
620
663
|
Request-specific configuration.
|
|
@@ -656,9 +699,9 @@ class AsyncMessagesClient:
|
|
|
656
699
|
"messages": convert_and_respect_annotation_metadata(
|
|
657
700
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
658
701
|
),
|
|
659
|
-
"
|
|
660
|
-
|
|
661
|
-
|
|
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,
|
|
662
705
|
},
|
|
663
706
|
request_options=request_options,
|
|
664
707
|
omit=OMIT,
|
|
@@ -695,7 +738,7 @@ class AsyncMessagesClient:
|
|
|
695
738
|
role: typing.Optional[MessageRole] = OMIT,
|
|
696
739
|
content: typing.Optional[MessageUpdateContent] = OMIT,
|
|
697
740
|
name: typing.Optional[str] = OMIT,
|
|
698
|
-
tool_calls: typing.Optional[typing.Sequence[
|
|
741
|
+
tool_calls: typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]] = OMIT,
|
|
699
742
|
tool_call_id: typing.Optional[str] = OMIT,
|
|
700
743
|
request_options: typing.Optional[RequestOptions] = None,
|
|
701
744
|
) -> Message:
|
|
@@ -717,7 +760,7 @@ class AsyncMessagesClient:
|
|
|
717
760
|
name : typing.Optional[str]
|
|
718
761
|
The name of the participant.
|
|
719
762
|
|
|
720
|
-
tool_calls : typing.Optional[typing.Sequence[
|
|
763
|
+
tool_calls : typing.Optional[typing.Sequence[ChatCompletionMessageToolCallInput]]
|
|
721
764
|
The list of tool calls requested.
|
|
722
765
|
|
|
723
766
|
tool_call_id : typing.Optional[str]
|
|
@@ -761,7 +804,9 @@ class AsyncMessagesClient:
|
|
|
761
804
|
),
|
|
762
805
|
"name": name,
|
|
763
806
|
"tool_calls": convert_and_respect_annotation_metadata(
|
|
764
|
-
object_=tool_calls,
|
|
807
|
+
object_=tool_calls,
|
|
808
|
+
annotation=typing.Sequence[ChatCompletionMessageToolCallInput],
|
|
809
|
+
direction="write",
|
|
765
810
|
),
|
|
766
811
|
"tool_call_id": tool_call_id,
|
|
767
812
|
},
|
|
@@ -800,7 +845,9 @@ class AsyncMessagesClient:
|
|
|
800
845
|
agent_id: str,
|
|
801
846
|
*,
|
|
802
847
|
messages: typing.Sequence[MessageCreate],
|
|
803
|
-
|
|
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,
|
|
804
851
|
stream_tokens: typing.Optional[bool] = OMIT,
|
|
805
852
|
request_options: typing.Optional[RequestOptions] = None,
|
|
806
853
|
) -> typing.AsyncIterator[LettaStreamingResponse]:
|
|
@@ -816,8 +863,14 @@ class AsyncMessagesClient:
|
|
|
816
863
|
messages : typing.Sequence[MessageCreate]
|
|
817
864
|
The messages to be sent to the agent.
|
|
818
865
|
|
|
819
|
-
|
|
820
|
-
|
|
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.
|
|
821
874
|
|
|
822
875
|
stream_tokens : typing.Optional[bool]
|
|
823
876
|
Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).
|
|
@@ -864,9 +917,9 @@ class AsyncMessagesClient:
|
|
|
864
917
|
"messages": convert_and_respect_annotation_metadata(
|
|
865
918
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
866
919
|
),
|
|
867
|
-
"
|
|
868
|
-
|
|
869
|
-
|
|
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,
|
|
870
923
|
"stream_tokens": stream_tokens,
|
|
871
924
|
},
|
|
872
925
|
headers={
|
|
@@ -911,7 +964,9 @@ class AsyncMessagesClient:
|
|
|
911
964
|
agent_id: str,
|
|
912
965
|
*,
|
|
913
966
|
messages: typing.Sequence[MessageCreate],
|
|
914
|
-
|
|
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,
|
|
915
970
|
request_options: typing.Optional[RequestOptions] = None,
|
|
916
971
|
) -> Run:
|
|
917
972
|
"""
|
|
@@ -925,8 +980,14 @@ class AsyncMessagesClient:
|
|
|
925
980
|
messages : typing.Sequence[MessageCreate]
|
|
926
981
|
The messages to be sent to the agent.
|
|
927
982
|
|
|
928
|
-
|
|
929
|
-
|
|
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.
|
|
930
991
|
|
|
931
992
|
request_options : typing.Optional[RequestOptions]
|
|
932
993
|
Request-specific configuration.
|
|
@@ -968,9 +1029,9 @@ class AsyncMessagesClient:
|
|
|
968
1029
|
"messages": convert_and_respect_annotation_metadata(
|
|
969
1030
|
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
970
1031
|
),
|
|
971
|
-
"
|
|
972
|
-
|
|
973
|
-
|
|
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,
|
|
974
1035
|
},
|
|
975
1036
|
request_options=request_options,
|
|
976
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:
|
letta_client/client.py
CHANGED
|
@@ -31,7 +31,6 @@ class ToolsClient(ToolsClientBase):
|
|
|
31
31
|
self,
|
|
32
32
|
*,
|
|
33
33
|
func: typing.Callable,
|
|
34
|
-
name: typing.Optional[str] = OMIT,
|
|
35
34
|
description: typing.Optional[str] = OMIT,
|
|
36
35
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
37
36
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -44,7 +43,6 @@ class ToolsClient(ToolsClientBase):
|
|
|
44
43
|
source_code = dedent(inspect.getsource(func))
|
|
45
44
|
return self.create(
|
|
46
45
|
source_code=source_code,
|
|
47
|
-
name=name,
|
|
48
46
|
description=description,
|
|
49
47
|
tags=tags,
|
|
50
48
|
source_type=source_type,
|
|
@@ -57,7 +55,6 @@ class ToolsClient(ToolsClientBase):
|
|
|
57
55
|
self,
|
|
58
56
|
*,
|
|
59
57
|
func: typing.Callable,
|
|
60
|
-
name: typing.Optional[str] = OMIT,
|
|
61
58
|
description: typing.Optional[str] = OMIT,
|
|
62
59
|
tags: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
63
60
|
source_type: typing.Optional[str] = OMIT,
|
|
@@ -70,7 +67,6 @@ class ToolsClient(ToolsClientBase):
|
|
|
70
67
|
source_code = dedent(inspect.getsource(func))
|
|
71
68
|
return self.upsert(
|
|
72
69
|
source_code=source_code,
|
|
73
|
-
name=name,
|
|
74
70
|
description=description,
|
|
75
71
|
tags=tags,
|
|
76
72
|
source_type=source_type,
|
|
@@ -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}"
|