Documentation
¶
Overview ¶
Package aigo 是 AI 全能工具库的统一入口。
通过 New 按协议创建统一的 llm.Client:
client, err := aigo.New(llm.ProviderAnthropic, llm.Config{APIKey: "sk-..."})
resp, err := client.Chat(ctx, &llm.Request{
Model: "claude-sonnet-4-5",
Messages: []llm.Message{llm.UserMessage("你好")},
})
也可以直接使用各 provider 子包(openaichat / openairesp / anthropic)。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package llm 提供跨厂商统一的大模型对话抽象。
|
Package llm 提供跨厂商统一的大模型对话抽象。 |
|
provider/anthropic
Package anthropic 基于 Anthropic 官方 SDK 实现 llm.Client, 使用 Messages 协议(POST /v1/messages)。
|
Package anthropic 基于 Anthropic 官方 SDK 实现 llm.Client, 使用 Messages 协议(POST /v1/messages)。 |
|
provider/openaichat
Package openaichat 基于 OpenAI 官方 SDK 实现 llm.Client, 使用 Chat Completions 协议(POST /v1/chat/completions)。
|
Package openaichat 基于 OpenAI 官方 SDK 实现 llm.Client, 使用 Chat Completions 协议(POST /v1/chat/completions)。 |
|
provider/openairesp
Package openairesp 基于 OpenAI 官方 SDK 实现 llm.Client, 使用 Responses 协议(POST /v1/responses)。
|
Package openairesp 基于 OpenAI 官方 SDK 实现 llm.Client, 使用 Responses 协议(POST /v1/responses)。 |
Click to show internal directories.
Click to hide internal directories.