身份验证
设置您的V0_API_KEY 环境变量。您可以在 v0.dev 上创建 API 密钥。
示例
将v0 与您的 Agent 一起使用。以下示例假定您在 agno/models/vercel.py 位置拥有 v0 Python 类(如您所提供)。
在此处查看更多示例:/examples/models/vercel。
参数
v0 还支持 OpenAI 的参数。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
了解如何将 Vercel v0 模型与 Agno 结合使用。
V0_API_KEY 环境变量。您可以在 v0.dev 上创建 API 密钥。
export V0_API_KEY=your-v0-api-key
setx V0_API_KEY your-v0-api-key
v0 与您的 Agent 一起使用。以下示例假定您在 agno/models/vercel.py 位置拥有 v0 Python 类(如您所提供)。
from agno.agent import Agent
from agno.models.vercel import v0
agent = Agent(
model=v0(id="v0-1.0-md"),
markdown=True
)
# 在终端打印响应
agent.print_response("Create a simple web app that displays a random number between 1 and 100.")
# agent.print_response("Create a webapp to fetch the weather of a city and display humidity, temperature, and wind speed in cards, use shadcn components and tailwind css")
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
id | str | "v0-1.0-md" | 用于生成响应的特定模型 ID。 |
name | str | "v0" | v0 代理的名称标识符。 |
provider | str | "Vercel" | 模型提供方,将“v0”与模型 ID 结合。 |
api_key | Optional[str] | - | 用于对 v0 服务请求进行身份验证的 API 密钥。从环境变量 V0_API_KEY 中检索。 |
base_url | str | "https://api.v0.dev/v1/" | 用于向 v0 服务发出 API 请求的基 URL。 |