feat: Add default external tools (#1899)

Co-authored-by: Matt Zhou <mattzhou@Matts-MacBook-Pro.local>
This commit is contained in:
Matthew Zhou
2024-10-17 10:26:37 -07:00
committed by GitHub
parent ff36e1b258
commit c9701f490c
10 changed files with 1162 additions and 960 deletions

View File

@@ -2,6 +2,8 @@ import json
import uuid
from letta import create_client
from letta.schemas.embedding_config import EmbeddingConfig
from letta.schemas.llm_config import LLMConfig
from letta.schemas.memory import ChatMemory
from letta.schemas.tool import Tool
@@ -38,6 +40,8 @@ def main():
# Create a `LocalClient` (you can also use a `RESTClient`, see the letta_rest_client.py example)
client = create_client()
client.set_default_llm_config(LLMConfig.default_config("gpt-4o-mini"))
client.set_default_embedding_config(EmbeddingConfig.default_config(provider="openai"))
# create tool
client.add_tool(wikipedia_query_tool)