Skip to content

Conversation

@vishwamartur
Copy link

Related to #4763

Add groq API support with groq SDK.

  • Initialize groq instance: Import createGroq from groq SDK and add createGroqInstance, getGroqModel, and getGroqLlamaModel functions in app/lib/.server/llm/model.ts.
  • Stream text responses: Import getGroqModel in app/lib/.server/llm/stream-text.ts, update streamText function to use getGroqModel, and set headers for the groq instance.
  • Add constants: Add constants for maximum tokens and response segments limits for the groq model in app/lib/.server/llm/constants.ts.
  • Retrieve API key: Update getAPIKey function in app/lib/.server/llm/api-key.ts to retrieve the API key for the groq model.
  • Update routes: Import createGroq in app/routes/api.chat.ts and app/routes/api.enhancer.ts.

Related to #4763

Add groq API support with groq SDK.

* **Initialize groq instance**: Import `createGroq` from `groq` SDK and add `createGroqInstance`, `getGroqModel`, and `getGroqLlamaModel` functions in `app/lib/.server/llm/model.ts`.
* **Stream text responses**: Import `getGroqModel` in `app/lib/.server/llm/stream-text.ts`, update `streamText` function to use `getGroqModel`, and set headers for the `groq` instance.
* **Add constants**: Add constants for maximum tokens and response segments limits for the `groq` model in `app/lib/.server/llm/constants.ts`.
* **Retrieve API key**: Update `getAPIKey` function in `app/lib/.server/llm/api-key.ts` to retrieve the API key for the `groq` model.
* **Update routes**: Import `createGroq` in `app/routes/api.chat.ts` and `app/routes/api.enhancer.ts`.
@vishwamartur vishwamartur marked this pull request as draft December 28, 2024 08:29
Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @vishwamartur.

The bolt.new is currently not accepting contributions. However there is https://bolt.diy/ that welcomes developers and builders to contribute. Check out https://www.youtube.com/watch?v=aZn8PhqUZVU and https://thinktank.ottomator.ai/.

@AriPerkkio AriPerkkio closed this Jan 10, 2025
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

Successfully merging this pull request may close these issues.

2 participants