Files
mistral-go-sdk/model/model.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

55 lines
2.3 KiB
Go

package model
// ModelCard represents a model (base or fine-tuned).
// For fine-tuned models (Type == "fine-tuned"), Job, Root, and Archived
// are populated.
type ModelCard struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
OwnedBy string `json:"owned_by"`
Capabilities ModelCapabilities `json:"capabilities"`
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
MaxContextLength int `json:"max_context_length"`
Aliases []string `json:"aliases"`
Deprecation *string `json:"deprecation,omitempty"`
DeprecationReplacementModel *string `json:"deprecation_replacement_model,omitempty"`
DefaultModelTemperature *float64 `json:"default_model_temperature,omitempty"`
Type string `json:"type"`
// Fine-tuned model fields (only when Type == "fine-tuned")
Job string `json:"job,omitempty"`
Root string `json:"root,omitempty"`
Archived bool `json:"archived,omitempty"`
}
// ModelCapabilities describes what a model can do.
type ModelCapabilities struct {
CompletionChat bool `json:"completion_chat"`
FunctionCalling bool `json:"function_calling"`
CompletionFIM bool `json:"completion_fim"`
FineTuning bool `json:"fine_tuning"`
Vision bool `json:"vision"`
OCR bool `json:"ocr"`
Classification bool `json:"classification"`
Moderation bool `json:"moderation"`
Audio bool `json:"audio"`
AudioTranscription bool `json:"audio_transcription"`
AudioTranscriptionRealtime bool `json:"audio_transcription_realtime"`
AudioSpeech bool `json:"audio_speech"`
}
// ModelList is the response from listing models.
type ModelList struct {
Object string `json:"object"`
Data []ModelCard `json:"data"`
}
// DeleteModelOut is the response from deleting a model.
type DeleteModelOut struct {
ID string `json:"id"`
Object string `json:"object"`
Deleted bool `json:"deleted"`
}