Spaces:
Sleeping
Sleeping
File size: 494 Bytes
62516b8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from __future__ import annotations
from typing import Any
from src.agent.infra.model_provider import get_groq_chat_model
def create_generation_agent(*, tools: list[Any]):
try:
from langchain.agents import create_agent
except ImportError as exc:
raise RuntimeError(
"langchain is not installed. Install dependencies before using /api/material."
) from exc
return create_agent(
model=get_groq_chat_model(),
tools=tools,
)
|