Documentation
¶
Index ¶
Constants ¶
View Source
const (
DefaultDiagnosticLimit = 4096
)
Variables ¶
View Source
var ( ErrNilContext = errors.New("llm: context is nil") ErrNilJSONGenerator = errors.New("llm: json generator is nil") ErrInvalidJSONRequest = errors.New("llm: invalid json request") )
View Source
var ( ErrOpenAIEmptyOutput = errors.New("llm: openai empty output") ErrOpenAIRefusalOutput = errors.New("llm: openai refusal output") )
Functions ¶
func RedactDiagnostic ¶
func ValidateJSONRequest ¶
func ValidateJSONRequest(req JSONRequest) error
Types ¶
type JSONGenerator ¶
type JSONGenerator interface {
GenerateJSON(ctx context.Context, req JSONRequest) (JSONResponse, error)
}
type JSONRequest ¶
type JSONResponse ¶
func RunJSON ¶
func RunJSON(ctx context.Context, generator JSONGenerator, req JSONRequest, provider string, reporter UsageReporter) (JSONResponse, error)
type OpenAICompatibleConfig ¶
type OpenAICompatibleJSONGenerator ¶
type OpenAICompatibleJSONGenerator struct {
// contains filtered or unexported fields
}
func NewOpenAICompatibleJSONGenerator ¶
func NewOpenAICompatibleJSONGenerator(cfg OpenAICompatibleConfig) (*OpenAICompatibleJSONGenerator, error)
func (*OpenAICompatibleJSONGenerator) GenerateJSON ¶
func (g *OpenAICompatibleJSONGenerator) GenerateJSON(ctx context.Context, req JSONRequest) (JSONResponse, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package openaipreset는 pkg/llm의 OpenAI 호환 JSON 생성 경로를 functional-options 클라이언트로 감싼 재사용 프리셋이다.
|
Package openaipreset는 pkg/llm의 OpenAI 호환 JSON 생성 경로를 functional-options 클라이언트로 감싼 재사용 프리셋이다. |
Click to show internal directories.
Click to hide internal directories.