Expand description
Groq model adapter for the agentkit agent loop.
This crate provides GroqAdapter and GroqConfig for connecting
the agent loop to the Groq chat completions API,
which serves open-source models on custom LPU hardware.
It is built on the generic agentkit_adapter_completions crate.
§Quick start
ⓘ
use agentkit_loop::{Agent, SessionConfig};
use agentkit_provider_groq::{GroqAdapter, GroqConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = GroqConfig::from_env()?;
let adapter = GroqAdapter::new(config)?;
let agent = Agent::builder()
.model(adapter)
.build()?;
let mut driver = agent
.start(SessionConfig::new("demo"))
.await?;
Ok(())
}Structs§
- Groq
Adapter - Model adapter that connects the agentkit agent loop to Groq.
- Groq
Config - Configuration for connecting to the Groq API.
- Groq
Provider - The Groq provider, implementing
CompletionsProvider. - Groq
Request Config - Request parameters serialized into the Groq request body.
Enums§
- Groq
Error - Errors produced by the Groq adapter.
Type Aliases§
- Groq
Session - An active session with the Groq API.
- Groq
Turn - A completed turn from the Groq API.