diff --git a/readme.md b/readme.md index fcd4c1f..ef656c3 100644 --- a/readme.md +++ b/readme.md @@ -121,7 +121,7 @@ instructions = """ # ai.clients.openai, can omit the ai.clients prefix client = "openai" -[ai.agents.reminder.options] +[ai.agents.orders.options] modelid = "gpt-4o-mini" ``` diff --git a/sample/Server/Program.cs b/sample/Server/Program.cs index e14f785..8e89efd 100644 --- a/sample/Server/Program.cs +++ b/sample/Server/Program.cs @@ -20,6 +20,10 @@ // πŸ‘‡ showcases using dynamic AI context from configuration builder.Services.AddKeyedSingleton("get_date", AIFunctionFactory.Create(() => DateTimeOffset.UtcNow, "get_date")); +// dummy ones for illustration +builder.Services.AddKeyedSingleton("create_order", AIFunctionFactory.Create(() => "OK", "create_order")); +builder.Services.AddKeyedSingleton("cancel_order", AIFunctionFactory.Create(() => "OK", "cancel_order")); +builder.Services.AddKeyedSingleton("save_notes", AIFunctionFactory.Create((string notes) => true, "save_notes")); // πŸ‘‡ implicitly calls AddChatClients builder.AddAIAgents(); diff --git a/sample/Server/ai.toml b/sample/Server/ai.toml index d0bd412..2c3ad11 100644 --- a/sample/Server/ai.toml +++ b/sample/Server/ai.toml @@ -14,16 +14,25 @@ instructions = """\ # ai.clients.openai, can omit the ai.clients prefix client = "openai" -use = ["tone", "get_date"] +use = ["tone", "get_date", "create_order", "cancel_order"] -[ai.agents.reminder.options] +[ai.agents.orders.options] modelid = "gpt-4o-mini" # additional properties could be added here +[ai.agents.notes] +description = "Help users create, manage, and retrieve notes effectively." +instructions = """ + You are an AI agent that assists users in creating, managing, and retrieving notes. + Your primary goals are to understand user requests related to notes, provide clear and concise responses, and utilize tools to organize and access note data efficiently. + """ +client = "grok" +use = ["tone", "save_notes", "get_date"] + [ai.context.tone] instructions = """\ Default to using spanish language, using argentinean "voseo" in your responses \ (unless the user explicitly talks in a different language). \ This means using "vos" instead of "tΓΊ" and conjugating verbs accordingly. \ - Don't use the expression "pa'" instead of "para". Don't mention the word "voseo". + Don't mention the word "voseo". """ \ No newline at end of file