Skip to content
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

Expose full response in generateText and generateObject (Cannot access full groq errors) #3208

Closed
williamlmao opened this issue Oct 5, 2024 · 1 comment
Labels

Comments

@williamlmao
Copy link

Feature Description

It would be really nice if generateText or generateObject could expose the full response, like so:

 const { object, usage, fullResponse } = await generateObject({
    model,
    messages,
    schema,
  });

Use Case

Certain inference providers like Groq put some additional information in other fields in an error response. For example if tool calls / json mode is on groq and the schema validation fails, it will tell you to look at the failed_generation. This is not currently accessible from the vercel AI SDK.

Additional context

If you want to see what I mean, just try bumping up the temperature to 2 on a generateObject from groq and use a somewhat complicated schema.

@williamlmao
Copy link
Author

Closed in favor of #3779

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

No branches or pull requests

2 participants