Skip to content

[JS] Current GenerateResponse implementation doesn't retain all data #2303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
telpirion opened this issue Mar 12, 2025 · 0 comments
Open

Comments

@telpirion
Copy link

Is your feature request related to a problem? Please describe.
My current project requires access to the citation data returned from Vertex AI / Gemini. Unfortunately, this data is not exposed to the flows that the project uses.

Describe the solution you'd like
It would be nice if all data from an LLM were retained and accessible to callers. I like that Genkit has streamlined LLM responses to a useful subset, but sometimes we need a little more info. Plus, as the LLMs themselves and their services evolve, it might be that the GenerateReponse class doesn't stay in-sync with the LLM service.

Describe alternatives you've considered
I traced through the calls in my project in a debugger. I found that the generate() function, called (implicitly) by ExecutePrompt, only returns a GenerateResponse object. Looking at the resulting object, I saw that the citation metadata that was present in the response argument to the GenerateResponse constructor was not present in the resulting object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant