anthropic

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: 9 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 Claude model with custom tool schema handling

func NewCustomChatModel

func NewCustomChatModel(ctx context.Context, config *einoclaude.Config) (*CustomChatModel, error)

NewCustomChatModel creates a new custom Anthropic chat model

func (*CustomChatModel) Generate

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

Generate implements the model.BaseChatModel interface

func (*CustomChatModel) Stream

func (m *CustomChatModel) Stream(ctx context.Context, input []*schema.Message, opts ...model.Option) (*schema.StreamReader[*schema.Message], error)

Stream implements the model.BaseChatModel interface

func (*CustomChatModel) WithTools

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

WithTools implements the model.ToolCallingChatModel interface

type CustomRoundTripper

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

CustomRoundTripper intercepts HTTP requests to fix Anthropic function schemas

func (*CustomRoundTripper) RoundTrip

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

RoundTrip implements http.RoundTripper to intercept and fix requests

Jump to

Keyboard shortcuts

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