概述
集成详情
模型功能
设置
要访问 Groq 模型,您需要创建一个 Groq 账户,获取 API 密钥,并安装langchain-groq 集成包。
凭证
Head to the Groq console 注册 Groq 并生成 API 密钥。 完成后设置 GROQ_API_KEY 环境变量:安装
LangChain 的 Groq 集成位于langchain-groq 包中:
实例化
Now we can instantiate our model object and generate chat completions.Reasoning FormatIf you choose to set a
reasoning_format, you must ensure that the model you are using supports it. You can find a list of supported models in the Groq documentation.调用
Vision
Groq supports vision capabilities with select models, allowing you to send images along with text prompts.Vision-capable models
meta-llama/llama-4-scout-17b-16e-instructmeta-llama/llama-4-maverick-17b-128e-instruct
API 参考
有关所有ChatGroq 功能和配置的详细文档,请前往 API reference.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

