feat(api): add endpoint to create group of dedicated agents (#79)

Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-03-22 18:44:22 +01:00
committed by GitHub
parent d689bb4331
commit c1ac7b675a
7 changed files with 136 additions and 57 deletions

View File

@@ -12,7 +12,7 @@ func (a *Agent) generateIdentity(guidance string) error {
guidance = "Generate a random character for roleplaying."
}
err := llm.GenerateTypedJSON(a.context.Context, a.client, guidance, a.options.LLMAPI.Model, a.options.character.ToJSONSchema(), &a.options.character)
err := llm.GenerateTypedJSON(a.context.Context, a.client, "Generate a character as JSON data. "+guidance, a.options.LLMAPI.Model, a.options.character.ToJSONSchema(), &a.options.character)
//err := llm.GenerateJSONFromStruct(a.context.Context, a.client, guidance, a.options.LLMAPI.Model, &a.options.character)
a.Character = a.options.character
if err != nil {