Files
opencatd-open/llm/llm.go
2025-04-16 18:01:27 +08:00

21 lines
401 B
Go

package llm
import (
"context"
"opencatd-open/internal/model"
)
type LLM interface {
Chat(ctx context.Context, req ChatRequest) (*ChatResponse, error)
StreamChat(ctx context.Context, req ChatRequest) (chan *StreamChatResponse, error)
GetTokenUsage() *TokenUsage
}
type llm struct {
ApiKey *model.ApiKey
Usage *model.Usage
tools any // TODO
Messages []any // TODO
llm LLM
}