Files
opencatd-open/llm/llm.go
Sakurasan a9ff7e1c94 add log
2025-04-21 21:50:29 +08:00

21 lines
400 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 *TokenUsage
tools any // TODO
Messages []any // TODO
llm LLM
}