Files
cogito/llm.go
Ettore Di Giacinto e5b763e1cc chore: abstract away LLM reply
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2026-02-19 21:09:08 +00:00

18 lines
366 B
Go

package cogito
import (
"context"
"github.com/sashabaranov/go-openai"
)
type LLM interface {
Ask(ctx context.Context, f Fragment) (Fragment, error)
CreateChatCompletion(ctx context.Context, request openai.ChatCompletionRequest) (LLMReply, error)
}
type LLMReply struct {
ChatCompletionResponse openai.ChatCompletionResponse
ReasoningContent string
}