---
title: "GroqAdapter"
description: "CopilotRuntime Adapter for Groq."
---

{/* GENERATE-DOCS path=packages/runtime/src/service-adapters/groq/groq-adapter.ts class=GroqAdapter */}
 
<RequestExample>
```jsx CopilotRuntime Example
const copilotKit = new CopilotRuntime();
return copilotKit.response(req, new GroqAdapter());
```
</RequestExample>
 
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

<ResponseField name="groq" type="Groq" >
An optional Groq instance to use.
</ResponseField>

<ResponseField name="model" type="string" >
The model to use.
</ResponseField>

## process(request: CopilotRuntimeChatCompletionRequest)

<ResponseField name="request" type="CopilotRuntimeChatCompletionRequest" required>

</ResponseField>

