Documentation
¶
Index ¶
- Constants
- Variables
- func FromAnthropic(client *anthropicSDK.Client, opts ...Options) *anthropic.InstructorAnthropic
- func FromCohere(client *cohereSDK.Client, opts ...Options) *cohere.InstructorCohere
- func FromGoogle(client *genai.Client, opts ...Options) *google.InstructorGoogle
- func FromOpenAI(client *openaiSDK.Client, opts ...Options) *openai.InstructorOpenAI
- func ToPtr[T any](val T) *T
- type GoogleRequest
- type GoogleResponse
- type Instructor
- type InstructorAnthropic
- type InstructorCohere
- type InstructorGoogle
- type InstructorOpenAI
- type Logger
- type Mode
- type Options
- type Provider
- type Schema
- type UnionOptions
- type UnionSchema
- type UnionValidationError
- type UsageSum
Constants ¶
View Source
const ( ModeToolCall = core.ModeToolCall ModeToolCallStrict = core.ModeToolCallStrict ModeJSON = core.ModeJSON ModeJSONStrict = core.ModeJSONStrict ModeJSONSchema = core.ModeJSONSchema ModeMarkdownJSON = core.ModeMarkdownJSON ModeDefault = core.ModeDefault )
Re-export mode constants
View Source
const ( ProviderOpenAI = core.ProviderOpenAI ProviderAnthropic = core.ProviderAnthropic ProviderCohere = core.ProviderCohere ProviderGoogle = core.ProviderGoogle )
Re-export provider constants
View Source
const ( DefaultMaxRetries = core.DefaultMaxRetries DefaultValidator = core.DefaultValidator )
Re-export default constants
Variables ¶
View Source
var ( WithMode = core.WithMode WithMaxRetries = core.WithMaxRetries WithValidation = core.WithValidation WithLogger = core.WithLogger WithLogging = core.WithLogging )
Re-export option functions
View Source
var ( NewSchema = core.NewSchema NewUnionSchema = core.NewUnionSchema ChatHandler = core.ChatHandler ChatHandlerUnion = core.ChatHandlerUnion ExtractJSON = core.ExtractJSON MergeOptions = core.MergeOptions )
Re-export core functions
View Source
var ( NewNoopLogger = core.NewNoopLogger NewLogger = core.NewLogger NewTextLogger = core.NewTextLogger NewLoggerFromString = core.NewLoggerFromString FromSlog = core.FromSlog ContextWithLogger = core.ContextWithLogger LoggerFromContext = core.LoggerFromContext )
Re-export logger functions
Functions ¶
func FromAnthropic ¶
func FromAnthropic(client *anthropicSDK.Client, opts ...Options) *anthropic.InstructorAnthropic
func FromCohere ¶
func FromCohere(client *cohereSDK.Client, opts ...Options) *cohere.InstructorCohere
func FromGoogle ¶
func FromGoogle(client *genai.Client, opts ...Options) *google.InstructorGoogle
func FromOpenAI ¶
func FromOpenAI(client *openaiSDK.Client, opts ...Options) *openai.InstructorOpenAI
Re-export provider factory functions
Types ¶
type GoogleRequest ¶
type GoogleRequest = google.GoogleRequest
Re-export provider-specific request types
type GoogleResponse ¶
type GoogleResponse = google.GoogleResponse
Re-export provider-specific request types
type InstructorAnthropic ¶
type InstructorAnthropic = anthropic.InstructorAnthropic
Re-export provider-specific types for backward compatibility
type InstructorCohere ¶
type InstructorCohere = cohere.InstructorCohere
Re-export provider-specific types for backward compatibility
type InstructorGoogle ¶
type InstructorGoogle = google.InstructorGoogle
Re-export provider-specific types for backward compatibility
type InstructorOpenAI ¶
type InstructorOpenAI = openai.InstructorOpenAI
Re-export provider-specific types for backward compatibility
type UnionValidationError ¶
type UnionValidationError = core.UnionValidationError
Re-export core types and interfaces
Click to show internal directories.
Click to hide internal directories.