--- 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. ```jsx 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. ```jsx const groq = new Groq({ apiKey: "your-api-key" }); const copilotKit = new CopilotRuntime(); return copilotKit.response( req, new GroqAdapter({ groq }), ); ``` ## Constructor An optional Groq instance to use. The model to use. ## process(request: CopilotRuntimeChatCompletionRequest)