-
Hey, looks very neat, like what I'm seeing so far! Few issues:
a. it seems like it's asking a bunch of physics questions, is the expectation that the AI will do parallel function calls for this? b. I shortened it to one question, but I see the response is always an empty string (I added logging in the openai/api.ts file and I don't even see a separate request that the researcher agent is doing) Maybe I messed something up? Can you see something wrong with my example? import {
AI,
Agent,
GroqArgs,
} from "llmclient";
const ai = AI("groq", {
apiKey: "mykey",
config: {
model: "mixtral-8x7b-32768",
// model: "llama3-70b-8192",
maxTokens: 2000,
},
} as GroqArgs);
ai.setOptions({ debug: true });
const researcher = new Agent(ai, {
name: "researcher",
description: "Researcher agent",
signature: `physicsQuestion "physics questions" -> answer "reply in bullet points"`,
});
const summarizer = new Agent(ai, {
name: "summarizer",
description: "Summarizer agent",
signature: `text "text so summarize" -> shortSummary "summarize in 5 to 10 words"`,
});
const agent = new Agent(ai, {
name: "agent",
description: "Agent",
signature: `question -> answer`,
agents: [researcher, summarizer],
});
async function summarize(question: string) {
const res = await agent.forward({ question });
console.log(">", res);
}
summarize(
`Research first and then summarize: Why is the centrifugal force talked about so much if it's not real?`
); what I see is: [
// { ... },
{
role: 'assistant',
content: undefined,
name: undefined,
tool_calls: [
{
id: 'call_q8sf',
type: 'function',
function: {
name: 'researcher',
arguments: `{"physicsQuestion":"Why is the centrifugal force talked about so much if it's not real?"}`
}
}
]
},
{ role: 'tool', content: '', tool_call_id: 'call_q8sf' }
], |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 23 replies
-
a. Yes, we support parallel function calling where available such as with openai |
Beta Was this translation helpful? Give feedback.
-
With ollama I not seeing support for function calling in their api. With groq I tried today the best example to test function calling is
|
Beta Was this translation helpful? Give feedback.
Sorry this was on me, growing pains I had missed an obvious bug. Thanks for the persistance. Should be fixed in the latest release 9.0.14