GenkitG
Genkit17mo ago
1 reply
specific-silver

Tool usage no longer working

Hi there. I am trying to implement a flow with dotprompt and function calling but I am faacing two issues:

1. When defining a json output and a tool the SDK fails: https://github.com/firebase/genkit/issues/889

I think the issue is in the generate.ts at the candidateError check:
https://github.com/firebase/genkit/blob/2f6c7d8f3a9b7f0a9466d20598fa2cfb4363956d/js/ai/src/generate.ts#L668
if (c.text() === "" && c.data() === null) return null

c.data() is actually undefined

2. I am not managing to get my tools called

When using gemini-1.5-flash it never calls my function, I tried the js-menu sample and it fails too.
With gemini-1.5-pro the sample works but my more complex prompt does not...

Am I missing any option I should consider when using tools?
GitHub
Describe the bug I have a flow with a prompt defined with dotpromt with a json schema as output. When not using any tool the flow works fine, but when I added a tool the flow is failling because th...
[JS] Schema validation failed when using a tool · Issue #889 · fire...
GitHub
An open source framework for building AI-powered apps with familiar code-centric patterns. Genkit makes it easy to integrate, test, and deploy sophisticated AI features to Firebase or Google Cloud....
genkit/js/ai/src/generate.ts at 2f6c7d8f3a9b7f0a9466d20598fa2cfb436...
Was this page helpful?