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

Support Fireworks AI endpoint #883

Open
arunbahl opened this issue Aug 15, 2024 · 5 comments
Open

Support Fireworks AI endpoint #883

arunbahl opened this issue Aug 15, 2024 · 5 comments

Comments

@arunbahl
Copy link

arunbahl commented Aug 15, 2024

Fireworks.ai clients previously worked using an openai-type provider, but have since stopped working with a 400 Bad Request error:

Request failed: {"error":{"object":"error","type":"invalid_request_error","message":"Extra inputs are not permitted, field: 'stream_options'"}}

Is it possible to:

  • prevent stream_options from being sent by setting a field in options? or
  • can we have a specific provider for FireworksAI that doesn't set a value for stream_options?

Fireworks generally has excellent token rates, it would be great to be able to use BAML with them.

@hellovai
Copy link
Contributor

oh yes for fireworks, can you try the "ollama" provider?

that one doesn't include "stream_options"

if that works, then I'll update the docs

@arunbahl
Copy link
Author

Great idea! I tried it, but got {"error":"unauthorized"}. Looks like ollama doesn't forward along the value for api_key.

You can set it manually using headers { "Authorization" "Bearer api_key" } but because string concatenation isn't supported there, you'd have to either save the API key in the .baml file itself, or use an environment variable with Bearer prepended to it.

@aaronvg
Copy link
Contributor

aaronvg commented Aug 15, 2024

yes our current workaround is to add the header with an environment variable like that, we'll see if we just add a quick provider for fireworks that works out-of-the-box in a cleaner way.

@hellovai
Copy link
Contributor

hellovai commented Aug 15, 2024

@arunbahl to unblock you i think we can have an env variable thats something like FIREWORKS_API_KEY="Bearer <key>"

But we'll look into a way to prevent and likely remove teh stream_options parameter

Oops, just realized you noted that already.

@arunbahl
Copy link
Author

Makes sense and the workaround is great for now. Thanks for your responsiveness and all your work on this project, we're fans :)

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

No branches or pull requests

3 participants