Private
Public Access
1
0

Moved api.ChatCompletionProvider, api.Chunk to api/provider

This commit is contained in:
2024-09-30 16:14:11 +00:00
parent a441866f2f
commit 327a128b2f
12 changed files with 153 additions and 152 deletions

View File

@@ -4,6 +4,7 @@ import (
"time"
"git.mlow.ca/mlow/lmcli/pkg/api"
"git.mlow.ca/mlow/lmcli/pkg/api/provider"
"git.mlow.ca/mlow/lmcli/pkg/tui/model"
"github.com/charmbracelet/bubbles/cursor"
"github.com/charmbracelet/bubbles/spinner"
@@ -33,7 +34,7 @@ type (
Err error
}
// sent on each chunk received from LLM
msgChatResponseChunk api.Chunk
msgChatResponseChunk provider.Chunk
// sent on each completed reply
msgChatResponse *api.Message
// sent when the response is canceled
@@ -84,7 +85,7 @@ type Model struct {
editorTarget editorTarget
stopSignal chan struct{}
replyChan chan api.Message
chatReplyChunks chan api.Chunk
chatReplyChunks chan provider.Chunk
persistence bool // whether we will save new messages in the conversation
// UI state
@@ -115,7 +116,7 @@ func Chat(app *model.AppModel) *Model {
stopSignal: make(chan struct{}),
replyChan: make(chan api.Message),
chatReplyChunks: make(chan api.Chunk),
chatReplyChunks: make(chan provider.Chunk),
wrap: true,
selectedMessage: -1,