initial commit of untested function stuff

This commit is contained in:
2024-11-08 20:53:12 -05:00
parent f603010dee
commit 37939088ed
15 changed files with 693 additions and 20 deletions

5
llm.go
View File

@@ -27,7 +27,7 @@ type Message struct {
type Request struct {
Messages []Message
Toolbox []Function
Toolbox *ToolBox
Temperature *float32
}
@@ -50,6 +50,7 @@ type Response struct {
type ChatCompletion interface {
ChatComplete(ctx context.Context, req Request) (Response, error)
SplitLongString(ctx context.Context, input string) ([]string, error)
}
type LLM interface {
@@ -57,7 +58,7 @@ type LLM interface {
}
func OpenAI(key string) LLM {
return openai{key: key}
return openaiImpl{key: key}
}
func Anthropic(key string) LLM {