| title | GroqAdapter |
|---|---|
| description | CopilotRuntime Adapter for Groq. |
{/* GENERATE-DOCS path=packages/runtime/src/service-adapters/groq/groq-adapter.ts class=GroqAdapter */}
```jsx CopilotRuntime Example const copilotKit = new CopilotRuntime(); return copilotKit.response(req, new GroqAdapter()); ```You can easily set the model to use by passing it to the constructor.
const copilotKit = new CopilotRuntime();
return copilotKit.response(
req,
new GroqAdapter({ model: "llama3-groq-70b-8192-tool-use-preview" }),
);To use your custom Groq instance, pass the groq property.
const groq = new Groq({
apiKey: "your-api-key"
});
const copilotKit = new CopilotRuntime();
return copilotKit.response(
req,
new GroqAdapter({ groq }),
);