googleapis / googleapis/nodejs-agentplatform

Constrained output and functionCall don't work together

Offen
#435 1 Kommentar 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
api: aiplatform priority: p2 type: bug
Vorherrschende Sprache
TypeScript
Sterne
182
Forks
69
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
10

Beschreibung

Hi,

I’m currently working on developing LLM agents and in the same call, I’m using tools (functionCall) to make external API requests, while also using constrained output to format the response as JSON.

However, I’m encountering the following error:
“For controlled generation of only function calls (forced function calling), please set 'tool_config.function_calling_config.mode' field to ANY instead of populating 'response_mime_type' and 'response_schema' fields. For more details, see: [https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#tool-config”](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#tool-config%E2%80%9D).

From what I understand, it seems like using tools alongside constrained output in JSON format isn't possible, though this is crucial for building agents.

Is this a bug, or is there another way to achieve this?

Thanks in advance for any help!

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Keine Repository-Dateien, Tests oder Einstiegspunkte werden genannt. Beginne damit, denselben Aufruf mit tools sowie response_mime_type und response_schema zu reproduzieren, und lies anschließend die verlinkte Anleitung von Vertex AI zu function-calling; abgeschlossen ist die Aufgabe, wenn festgestellt wurde, ob die Kombination unterstützt wird, und das bestätigte Verhalten oder die Einschränkung dokumentiert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
google-cloud, typescript
Bereich
ai, api
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
20/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.