Task: Generate 1-3 broad tags categorizing the main themes of the chat history, along…
- User
Task:
Generate 1-3 broad tags categorizing the main themes of the chat history, along with 1-3 more specific subtopic tags.
Guidelines:
- Start with high-level domains (e.g. Science, Technology, Philosophy, Arts, Politics, Business, Health, Sports, Entertainment, Education)
- Consider including relevant subfields/subdomains if they are strongly represented throughout the conversation
- If content is too short (less than 3 messages) or too diverse, use only ["General"]
- Use the chat's primary language; default to English if multilingual
- Prioritize accuracy over specificity
Output:
JSON format: { "tags": ["tag1", "tag2", "tag3"] }
Chat History:
<chat_history> USER: from letta import create_client from letta.schemas.memory import ChatMemory """ Make sure you run the Letta server before running this example.
letta server""" def main(): # Connect to the server as a user client = create_client(base_url="https://letta.prtl.cc") # list available configs on the server llm_configs = client.list_llm_configs() print(f"Available LLM configs: {llm_configs}") embedding_configs = client.list_embedding_configs() print(f"Available embedding configs: {embedding_configs}") # Create an agent agent_state = client.create_agent( name="my_agent", memory=ChatMemory(human="My name is Sarah.", persona="I am a friendly AI."), embedding_config=embedding_configs[0], llm_config=llm_configs[0], ) print(f"Created agent: {agent_state.name} with ID {str(agent_state.id)}") # Send a message to the agent print(f"Created agent: {agent_state.name} with ID {str(agent_state.id)}") response = client.user_message(agent_id=agent_state.id, message="Whats my name?") print(f"Recieved response:", response.messages) # Delete agent client.delete_agent(agent_id=agent_state.id) print(f"Deleted agent: {agent_state.name} with ID {str(agent_state.id)}") if name == "main": main() ASSISTANT:
</chat_history> - Assistant
{ "tags": ["Technology", "Programming"], "subtags": ["API Integration", "AI Agents"] }