openai

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomChatModel

type CustomChatModel struct {
	// contains filtered or unexported fields
}

CustomChatModel wraps the eino-ext OpenAI model with custom tool schema handling

func NewCustomChatModel

func NewCustomChatModel(ctx context.Context, config *einoopenai.ChatModelConfig) (*CustomChatModel, error)

NewCustomChatModel creates a new custom OpenAI chat model

func (*CustomChatModel) BindForcedTools

func (c *CustomChatModel) BindForcedTools(tools []*schema.ToolInfo) error

BindForcedTools implements model.ToolCallingChatModel

func (*CustomChatModel) BindTools

func (c *CustomChatModel) BindTools(tools []*schema.ToolInfo) error

BindTools implements model.ToolCallingChatModel

func (*CustomChatModel) Generate

func (c *CustomChatModel) Generate(ctx context.Context, in []*schema.Message, opts ...model.Option) (*schema.Message, error)

Generate implements model.ChatModel

func (*CustomChatModel) GetType

func (c *CustomChatModel) GetType() string

GetType implements model.ChatModel

func (*CustomChatModel) IsCallbacksEnabled

func (c *CustomChatModel) IsCallbacksEnabled() bool

IsCallbacksEnabled implements model.ChatModel

func (*CustomChatModel) Stream

Stream implements model.ChatModel

func (*CustomChatModel) WithTools

func (c *CustomChatModel) WithTools(tools []*schema.ToolInfo) (model.ToolCallingChatModel, error)

WithTools implements model.ToolCallingChatModel

type CustomRoundTripper

type CustomRoundTripper struct {
	// contains filtered or unexported fields
}

CustomRoundTripper intercepts HTTP requests to fix OpenAI function schemas

func (*CustomRoundTripper) RoundTrip

func (c *CustomRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper to intercept and fix OpenAI requests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL