Files
mistral-go-sdk/chat/doc.go
vikingowl ea47d14b38 feat: v0.2.0 — sync with upstream Python SDK v2.0.4
Add ToolReferenceChunk, ToolFileChunk, BuiltInConnector enum,
ReferenceID union type (int|string), GuardrailConfig with v1/v2
moderation, ConnectorTool for custom connectors, and guardrails
field on chat/agents/conversation requests.

Add AudioTranscriptionRealtime and AudioSpeech to ModelCapabilities.

Move GuardrailConfig from agents/ to chat/ as shared base type.
Remove bundled OpenAPI spec; SDK now tracks upstream Python SDK.

BREAKING: ReferenceChunk.ReferenceIDs changed from []int to
[]ReferenceID. Use IntRef(n) / StringRef(s) constructors.
2026-03-17 11:23:58 +01:00

27 lines
1.0 KiB
Go

// Package chat provides types for the Mistral chat completion API.
//
// Messages use a sealed interface pattern — create them with
// [UserMessage], [SystemMessage], [AssistantMessage], or [ToolMessage]
// struct literals.
//
// Content is polymorphic: it can be a plain string (via [TextContent]),
// nil, or a slice of [ContentChunk] values (text, image URL, document URL,
// audio, tool reference, tool file).
//
// # Guardrails
//
// [GuardrailConfig] configures moderation guardrails on completion requests.
// Both v1 ([ModerationLLMV1Config]) and v2 ([ModerationLLMV2Config]) moderation
// configs are supported.
//
// # Content Chunks
//
// The following chunk types are supported: [TextChunk], [ImageURLChunk],
// [DocumentURLChunk], [FileChunk], [ReferenceChunk], [ThinkChunk],
// [AudioChunk], [ToolReferenceChunk], [ToolFileChunk].
// Unrecognized types are preserved as [UnknownChunk].
//
// [ReferenceChunk] uses [ReferenceID] values that can hold either integer
// or string identifiers. Use [IntRef] and [StringRef] constructors.
package chat