Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.14 KB

File metadata and controls

52 lines (40 loc) · 1.14 KB
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 }),
);

Constructor

An optional Groq instance to use. The model to use.

process(request: CopilotRuntimeChatCompletionRequest)