Documentation
¶
Overview ¶
Package goaisdk is the module root of go-ai-sdk, an idiomatic Go port of the Vercel AI SDK: one provider-agnostic API for text generation, streaming, structured output, tool calling, embeddings, and image/speech/transcription across 39 providers.
This root package contains no code — it exists to orient you. Start with github.com/azrtydxb/go-ai-sdk/ai.
Layout ¶
The module is layered, and you generally import exactly two packages: ai for the calls, and one providers/* package to name a model.
- ai — the high-level API. GenerateText, StreamText, GenerateObject[T], Embed/EmbedMany, GenerateImage/Speech/Video, Transcribe, plus tools, middleware, telemetry, and the retry/error model. Provider-agnostic: it reaches into no providers/* package.
- provider — the interfaces every provider implements (LanguageModel, EmbeddingModel, ImageModel, …) and the wire types they exchange (Message, ContentPart, StreamPart, Response, Usage). Implement these to add a provider; import them to write middleware.
- providers/* — one package per provider (anthropic, openai, google, bedrock, …), each returning models that satisfy provider's interfaces.
- agent — a reusable model+instructions+tools bundle over ai's loop, and sub-agent delegation via AsTool.
- mcp — a Model Context Protocol client, exposing an MCP server's tools as ai.Tool values via mcp.Tools.
- codemode — executing model-authored code against your tools.
- ai/aitest, provider/providertest — test doubles and a shared provider conformance suite.
The OpenTelemetry bridge lives in a separate module, github.com/azrtydxb/go-ai-sdk/contrib/otel, so the core SDK stays dependency-free.
Quickstart ¶
model := anthropic.New().Model("claude-sonnet-5")
result, err := ai.GenerateText(ctx, ai.GenerateTextOpts{
Model: model,
Prompt: "Why is the sky blue? Answer in one sentence.",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Text)
Swapping providers means changing only the Model line. See the runnable examples on ai for streaming, structured output, and tool calling.
Documentation ¶
The docs/ directory in the repository holds the full guide set: getting-started.md, architecture.md (how ai, provider, and providers/* relate), core/ (one guide per capability), providers/ (one per provider), mcp.md, troubleshooting.md, and migrating-from-vercel-ai-sdk.md for anyone arriving from the TypeScript SDK.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package agent provides a reusable, higher-level configuration on top of package ai's GenerateText/StreamText: an Agent bundles a model, system instructions, tools, and a handful of loop-shaping options (MaxSteps, StopWhen, Output, RuntimeContext, ApproveToolCall) into one value that can be run repeatedly with different inputs via RunOpts, and exposed to another Agent as a tool via AsTool.
|
Package agent provides a reusable, higher-level configuration on top of package ai's GenerateText/StreamText: an Agent bundles a model, system instructions, tools, and a handful of loop-shaping options (MaxSteps, StopWhen, Output, RuntimeContext, ApproveToolCall) into one value that can be run repeatedly with different inputs via RunOpts, and exposed to another Agent as a tool via AsTool. |
|
Package ai is the high-level, provider-agnostic API for go-ai-sdk: text generation, structured output, tool calling, streaming, embeddings, and media generation, built entirely on the interfaces in package provider.
|
Package ai is the high-level, provider-agnostic API for go-ai-sdk: text generation, structured output, tool calling, streaming, embeddings, and media generation, built entirely on the interfaces in package provider. |
|
aitest
Package aitest provides test doubles for the ai and provider packages.
|
Package aitest provides test doubles for the ai and provider packages. |
|
Package codemode implements "Code Mode": instead of exposing each tool as a separate function call the model invokes one at a time, Tool wraps a set of ai.Tool values into a single run_code tool.
|
Package codemode implements "Code Mode": instead of exposing each tool as a separate function call the model invokes one at a time, Tool wraps a set of ai.Tool values into a single run_code tool. |
|
contrib
|
|
|
otel
module
|
|
|
examples
|
|
|
embed
command
Command embed shows Embed, computing an embedding vector for a string.
|
Command embed shows Embed, computing an embedding vector for a string. |
|
generate-image
command
Command generate-image shows GenerateImage, creating an image from a text prompt.
|
Command generate-image shows GenerateImage, creating an image from a text prompt. |
|
generate-object
command
Command generate-object decodes a structured Recipe from the model.
|
Command generate-object decodes a structured Recipe from the model. |
|
generate-speech
command
Command generate-speech shows GenerateSpeech, synthesizing spoken audio from text.
|
Command generate-speech shows GenerateSpeech, synthesizing spoken audio from text. |
|
generate-text
command
Command generate-text shows the simplest possible GenerateText call.
|
Command generate-text shows the simplest possible GenerateText call. |
|
mcp-tools
command
Command mcp-tools drives an MCP stdio server's tools through GenerateText.
|
Command mcp-tools drives an MCP stdio server's tools through GenerateText. |
|
stream-text
command
Command stream-text shows StreamText, printing text deltas as they arrive.
|
Command stream-text shows StreamText, printing text deltas as they arrive. |
|
tool-calling
command
Command tool-calling shows GenerateText driving a multi-step tool loop.
|
Command tool-calling shows GenerateText driving a multi-step tool loop. |
|
transcribe
command
Command transcribe shows Transcribe, converting speech audio to text.
|
Command transcribe shows Transcribe, converting speech audio to text. |
|
internal
|
|
|
eventstream
Package eventstream implements a minimal reader/writer for the AWS binary event stream format (content-type application/vnd.amazon.eventstream) used by streaming AWS APIs such as Bedrock's ConverseStream.
|
Package eventstream implements a minimal reader/writer for the AWS binary event stream format (content-type application/vnd.amazon.eventstream) used by streaming AWS APIs such as Bedrock's ConverseStream. |
|
eventstream/eventstreamtest
Package eventstreamtest builds AWS event stream frames for test fixtures.
|
Package eventstreamtest builds AWS event stream frames for test fixtures. |
|
fetchmedia
Package fetchmedia downloads media (image/video/audio) bytes from a server-chosen URL with SSRF and memory-DoS guards, for providers that return generated media as URLs rather than inline data.
|
Package fetchmedia downloads media (image/video/audio) bytes from a server-chosen URL with SSRF and memory-DoS guards, for providers that return generated media as URLs rather than inline data. |
|
gauth
Package gauth mints OAuth2 access tokens for Google Cloud APIs from a service-account key, using only the standard library (RS256 JWT bearer grant, per https://developers.google.com/identity/protocols/oauth2/service-account).
|
Package gauth mints OAuth2 access tokens for Google Cloud APIs from a service-account key, using only the standard library (RS256 JWT bearer grant, per https://developers.google.com/identity/protocols/oauth2/service-account). |
|
geminicompat
Package geminicompat implements the go-ai-sdk provider interfaces against Google's Generative Language (Gemini) wire format, parameterized so that Gemini-compatible providers can reuse it by supplying a Config.
|
Package geminicompat implements the go-ai-sdk provider interfaces against Google's Generative Language (Gemini) wire format, parameterized so that Gemini-compatible providers can reuse it by supplying a Config. |
|
geminicompat/compattest
Package compattest provides a shared httptest fixture server that speaks the Gemini generateContent/streamGenerateContent/batchEmbedContents wire format, for use by provider/providertest conformance runs and other tests of internal/geminicompat-based providers.
|
Package compattest provides a shared httptest fixture server that speaks the Gemini generateContent/streamGenerateContent/batchEmbedContents wire format, for use by provider/providertest conformance runs and other tests of internal/geminicompat-based providers. |
|
httpheader
Package httpheader provides the shared helper for applying user-supplied extra HTTP headers (provider.Call.Headers and its per-modality equivalents) to outgoing requests, without letting them override the provider's own authentication header.
|
Package httpheader provides the shared helper for applying user-supplied extra HTTP headers (provider.Call.Headers and its per-modality equivalents) to outgoing requests, without letting them override the provider's own authentication header. |
|
multipartutil
Package multipartutil holds a small guard shared by every provider that builds a multipart/form-data request from caller-controlled strings (file MediaType/Filename, ProviderOptions keys/values, and similar caller-derived field names or values).
|
Package multipartutil holds a small guard shared by every provider that builds a multipart/form-data request from caller-controlled strings (file MediaType/Filename, ProviderOptions keys/values, and similar caller-derived field names or values). |
|
openaicompat
Package openaicompat implements the go-ai-sdk provider interfaces against the OpenAI Chat Completions and Embeddings wire format, parameterized so that OpenAI-compatible providers (OpenAI itself, and any provider that exposes an OpenAI-compatible API) can reuse it by supplying a Config.
|
Package openaicompat implements the go-ai-sdk provider interfaces against the OpenAI Chat Completions and Embeddings wire format, parameterized so that OpenAI-compatible providers (OpenAI itself, and any provider that exposes an OpenAI-compatible API) can reuse it by supplying a Config. |
|
openaicompat/compattest
Package compattest provides a shared httptest fixture server that speaks the OpenAI chat-completions + embeddings wire format, for use by provider/providertest conformance runs and other tests of internal/openaicompat-based providers.
|
Package compattest provides a shared httptest fixture server that speaks the OpenAI chat-completions + embeddings wire format, for use by provider/providertest conformance runs and other tests of internal/openaicompat-based providers. |
|
partialjson
Package partialjson repairs a truncated (partial) JSON document — the kind produced mid-stream while accumulating a growing JSON string from an LLM — into a syntactically valid JSON document that best-effort preserves the content already present.
|
Package partialjson repairs a truncated (partial) JSON document — the kind produced mid-stream while accumulating a growing JSON string from an LLM — into a syntactically valid JSON document that best-effort preserves the content already present. |
|
providerutil
Package providerutil holds two tiny helpers that every HTTP provider needs and that were previously copy-pasted per provider: extracting a human-readable message from an error response body, and merging ProviderOptions["<name>"] into an already-marshaled JSON request.
|
Package providerutil holds two tiny helpers that every HTTP provider needs and that were previously copy-pasted per provider: extracting a human-readable message from an error response body, and merging ProviderOptions["<name>"] into an already-marshaled JSON request. |
|
schema
Package schema generates JSON Schema documents from Go struct types via reflection, following the subset of JSON Schema draft used by tool/object generation in the AI SDK.
|
Package schema generates JSON Schema documents from Go struct types via reflection, following the subset of JSON Schema draft used by tool/object generation in the AI SDK. |
|
sigv4
Package sigv4 implements AWS Signature Version 4 request signing (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html), sufficient for signing requests to AWS service APIs such as Bedrock Runtime.
|
Package sigv4 implements AWS Signature Version 4 request signing (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html), sufficient for signing requests to AWS service APIs such as Bedrock Runtime. |
|
transcribeutil
Package transcribeutil holds small helpers shared by the asynchronous (upload-then-poll) transcription providers — assemblyai, gladia, and revai — whose Transcribe flows are structurally identical (upload/create a job, poll it to a terminal state, ctx-aware between polls) even though each speaks a different wire format.
|
Package transcribeutil holds small helpers shared by the asynchronous (upload-then-poll) transcription providers — assemblyai, gladia, and revai — whose Transcribe flows are structurally identical (upload/create a job, poll it to a terminal state, ctx-aware between polls) even though each speaks a different wire format. |
|
websocket
Package websocket implements an RFC 6455 WebSocket client using only the Go standard library.
|
Package websocket implements an RFC 6455 WebSocket client using only the Go standard library. |
|
websocket/websockettest
Package websockettest provides minimal RFC 6455 server-side helpers for testing internal/websocket's client, and for fixture servers used by provider packages elsewhere in this module.
|
Package websockettest provides minimal RFC 6455 server-side helpers for testing internal/websocket's client, and for fixture servers used by provider packages elsewhere in this module. |
|
wsstream
Package wsstream provides the shared machinery behind a live, bidirectional WebSocket stream that yields decoded events: the read-pump goroutine, its clean-teardown and leak-safety guarantees, and idempotent Close/Err/Events semantics.
|
Package wsstream provides the shared machinery behind a live, bidirectional WebSocket stream that yields decoded events: the read-pump goroutine, its clean-teardown and leak-safety guarantees, and idempotent Close/Err/Events semantics. |
|
Package mcp implements a client for the Model Context Protocol (MCP): a JSON-RPC 2.0 based protocol that lets an AI application discover and invoke tools exposed by an external server process.
|
Package mcp implements a client for the Model Context Protocol (MCP): a JSON-RPC 2.0 based protocol that lets an AI application discover and invoke tools exposed by an external server process. |
|
Package provider is the spec every go-ai-sdk provider implements: a set of interfaces (LanguageModel, EmbeddingModel, ImageModel, SpeechModel, TranscriptionModel) plus the unified request/response types they share — Call, Response, Message/ContentPart, StreamPart, ToolDef, FinishReason, Usage.
|
Package provider is the spec every go-ai-sdk provider implements: a set of interfaces (LanguageModel, EmbeddingModel, ImageModel, SpeechModel, TranscriptionModel) plus the unified request/response types they share — Call, Response, Message/ContentPart, StreamPart, ToolDef, FinishReason, Usage. |
|
providertest
Package providertest is a conformance suite for provider.LanguageModel implementations.
|
Package providertest is a conformance suite for provider.LanguageModel implementations. |
|
providers
|
|
|
anthropic
Package anthropic implements the go-ai-sdk provider interfaces against Anthropic's Messages API.
|
Package anthropic implements the go-ai-sdk provider interfaces against Anthropic's Messages API. |
|
assemblyai
Package assemblyai implements the go-ai-sdk provider.TranscriptionModel interface against AssemblyAI's asynchronous speech-to-text API: audio is uploaded, a transcript is created from the resulting URL, then the transcript is polled until it reaches a terminal state.
|
Package assemblyai implements the go-ai-sdk provider.TranscriptionModel interface against AssemblyAI's asynchronous speech-to-text API: audio is uploaded, a transcript is created from the resulting URL, then the transcript is polled until it reaches a terminal state. |
|
azure
Package azure provides the Azure OpenAI provider.
|
Package azure provides the Azure OpenAI provider. |
|
baseten
Package baseten provides the Baseten provider: Baseten's Model APIs expose an OpenAI-chat-completions compatible interface, so this package is a preset over the shared openaicompat base.
|
Package baseten provides the Baseten provider: Baseten's Model APIs expose an OpenAI-chat-completions compatible interface, so this package is a preset over the shared openaicompat base. |
|
bedrock
Package bedrock implements the go-ai-sdk provider.LanguageModel interfaces against Amazon Bedrock's Converse and ConverseStream APIs, signing requests with AWS Signature Version 4.
|
Package bedrock implements the go-ai-sdk provider.LanguageModel interfaces against Amazon Bedrock's Converse and ConverseStream APIs, signing requests with AWS Signature Version 4. |
|
bfl
Package bfl implements the go-ai-sdk provider.ImageModel interface against Black Forest Labs' asynchronous image-generation API: a generation is created, then polled at the absolute polling_url it returns until it reaches a terminal state.
|
Package bfl implements the go-ai-sdk provider.ImageModel interface against Black Forest Labs' asynchronous image-generation API: a generation is created, then polled at the absolute polling_url it returns until it reaches a terminal state. |
|
cartesia
Package cartesia implements the go-ai-sdk provider.SpeechModel interface against Cartesia's text-to-speech API.
|
Package cartesia implements the go-ai-sdk provider.SpeechModel interface against Cartesia's text-to-speech API. |
|
cerebras
Package cerebras provides the Cerebras provider: Cerebras's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package cerebras provides the Cerebras provider: Cerebras's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
cohere
Package cohere implements the go-ai-sdk provider interfaces against Cohere's v2 chat and embed APIs.
|
Package cohere implements the go-ai-sdk provider interfaces against Cohere's v2 chat and embed APIs. |
|
deepgram
Package deepgram implements the go-ai-sdk provider.TranscriptionModel interface against the Deepgram speech-to-text API.
|
Package deepgram implements the go-ai-sdk provider.TranscriptionModel interface against the Deepgram speech-to-text API. |
|
deepinfra
Package deepinfra provides the DeepInfra provider: DeepInfra's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package deepinfra provides the DeepInfra provider: DeepInfra's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
deepseek
Package deepseek provides the Deepseek provider: Deepseek's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package deepseek provides the Deepseek provider: Deepseek's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
elevenlabs
Package elevenlabs implements the go-ai-sdk provider.SpeechModel and provider.TranscriptionModel interfaces against the ElevenLabs API.
|
Package elevenlabs implements the go-ai-sdk provider.SpeechModel and provider.TranscriptionModel interfaces against the ElevenLabs API. |
|
fal
Package fal implements the go-ai-sdk provider.ImageModel interface against fal.ai's synchronous fal.run image-generation endpoint.
|
Package fal implements the go-ai-sdk provider.ImageModel interface against fal.ai's synchronous fal.run image-generation endpoint. |
|
fireworks
Package fireworks provides the Fireworks provider: Fireworks' API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package fireworks provides the Fireworks provider: Fireworks' API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
gateway
Package gateway provides the Vercel AI Gateway provider: an OpenAI-compatible routing endpoint that fronts many upstream model providers (OpenAI, Anthropic, Google, and more) behind "provider/model" routing slugs such as "openai/gpt-4o" or "anthropic/claude-3-5-sonnet".
|
Package gateway provides the Vercel AI Gateway provider: an OpenAI-compatible routing endpoint that fronts many upstream model providers (OpenAI, Anthropic, Google, and more) behind "provider/model" routing slugs such as "openai/gpt-4o" or "anthropic/claude-3-5-sonnet". |
|
gladia
Package gladia implements the go-ai-sdk provider.TranscriptionModel interface against Gladia's asynchronous speech-to-text API: audio is uploaded, a pre-recorded transcription job is created from the resulting URL, then the job is polled until it reaches a terminal state.
|
Package gladia implements the go-ai-sdk provider.TranscriptionModel interface against Gladia's asynchronous speech-to-text API: audio is uploaded, a pre-recorded transcription job is created from the resulting URL, then the job is polled until it reaches a terminal state. |
|
google
Package google implements the go-ai-sdk provider interfaces against Google's Generative Language API (Gemini).
|
Package google implements the go-ai-sdk provider interfaces against Google's Generative Language API (Gemini). |
|
groq
Package groq provides the Groq provider: Groq's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package groq provides the Groq provider: Groq's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
huggingface
Package huggingface provides the Hugging Face provider: Hugging Face's Inference Router exposes an OpenAI-chat-completions compatible API, so this package is a preset over the shared openaicompat base.
|
Package huggingface provides the Hugging Face provider: Hugging Face's Inference Router exposes an OpenAI-chat-completions compatible API, so this package is a preset over the shared openaicompat base. |
|
hume
Package hume implements the go-ai-sdk provider.SpeechModel interface against Hume's Octave text-to-speech API.
|
Package hume implements the go-ai-sdk provider.SpeechModel interface against Hume's Octave text-to-speech API. |
|
lmnt
Package lmnt implements the go-ai-sdk provider.SpeechModel interface against LMNT's text-to-speech API.
|
Package lmnt implements the go-ai-sdk provider.SpeechModel interface against LMNT's text-to-speech API. |
|
lmstudio
Package lmstudio provides the LM Studio provider: LM Studio's local server exposes an OpenAI-chat-completions compatible API, so this package is a preset over the shared openaicompat base.
|
Package lmstudio provides the LM Studio provider: LM Studio's local server exposes an OpenAI-chat-completions compatible API, so this package is a preset over the shared openaicompat base. |
|
luma
Package luma implements the go-ai-sdk provider.ImageModel interface against Luma's Dream Machine image-generation API, which is asynchronous: a generation is created, then polled until it reaches a terminal state.
|
Package luma implements the go-ai-sdk provider.ImageModel interface against Luma's Dream Machine image-generation API, which is asynchronous: a generation is created, then polled until it reaches a terminal state. |
|
minimax
Package minimax provides the MiniMax provider: MiniMax's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package minimax provides the MiniMax provider: MiniMax's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
mistral
Package mistral implements the go-ai-sdk provider interfaces against Mistral's chat completions and embeddings API, as a preset over the shared openaicompat base.
|
Package mistral implements the go-ai-sdk provider interfaces against Mistral's chat completions and embeddings API, as a preset over the shared openaicompat base. |
|
mixedbread
Package mixedbread implements the go-ai-sdk provider.RerankingModel interface against Mixedbread AI's rerank API.
|
Package mixedbread implements the go-ai-sdk provider.RerankingModel interface against Mixedbread AI's rerank API. |
|
moonshot
Package moonshot provides the Moonshot provider: Moonshot's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package moonshot provides the Moonshot provider: Moonshot's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
nvidia
Package nvidia provides the NVIDIA NIM provider: NVIDIA's NIM API endpoints are OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package nvidia provides the NVIDIA NIM provider: NVIDIA's NIM API endpoints are OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
openai
Package openai implements the go-ai-sdk provider interfaces against OpenAI's Chat Completions and Embeddings APIs.
|
Package openai implements the go-ai-sdk provider interfaces against OpenAI's Chat Completions and Embeddings APIs. |
|
perplexity
Package perplexity provides the Perplexity provider: Perplexity's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package perplexity provides the Perplexity provider: Perplexity's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
prodia
Package prodia implements the go-ai-sdk provider.ImageModel interface against Prodia's v2 synchronous inference API.
|
Package prodia implements the go-ai-sdk provider.ImageModel interface against Prodia's v2 synchronous inference API. |
|
qwen
Package qwen provides the Qwen provider: Alibaba's DashScope OpenAI-compatible mode is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package qwen provides the Qwen provider: Alibaba's DashScope OpenAI-compatible mode is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
replicate
Package replicate implements the go-ai-sdk provider.ImageModel interface against Replicate's synchronous ("Prefer: wait") predictions API.
|
Package replicate implements the go-ai-sdk provider.ImageModel interface against Replicate's synchronous ("Prefer: wait") predictions API. |
|
revai
Package revai implements the go-ai-sdk provider.TranscriptionModel interface against Rev.ai's asynchronous speech-to-text API: a job is created from the uploaded audio, the job is polled until it reaches a terminal state, then the transcript is fetched.
|
Package revai implements the go-ai-sdk provider.TranscriptionModel interface against Rev.ai's asynchronous speech-to-text API: a job is created from the uploaded audio, the job is polled until it reaches a terminal state, then the transcript is fetched. |
|
together
Package together provides the Together provider: Together's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package together provides the Together provider: Together's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |
|
vertex
Package vertex implements the go-ai-sdk provider interfaces against Google Cloud's Vertex AI API (Gemini models hosted on Google Cloud).
|
Package vertex implements the go-ai-sdk provider interfaces against Google Cloud's Vertex AI API (Gemini models hosted on Google Cloud). |
|
voyage
Package voyage implements the go-ai-sdk provider.EmbeddingModelWithOptions and provider.RerankingModel interfaces against Voyage AI's embeddings and rerank APIs.
|
Package voyage implements the go-ai-sdk provider.EmbeddingModelWithOptions and provider.RerankingModel interfaces against Voyage AI's embeddings and rerank APIs. |
|
xai
Package xai provides the X.AI provider: X.AI's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base.
|
Package xai provides the X.AI provider: X.AI's API is OpenAI-chat-completions compatible, so this package is a preset over the shared openaicompat base. |