Chat Stream Integration (#52)

* rm: axios dependency

* add: stream parsing for normal style

* fix: empty string problem

* add: stream for embedded prompts

* update: version increment
This commit is contained in:
Kevin Dang
2024-04-21 14:40:30 -07:00
committed by GitHub
parent bc989580a9
commit d67106c03e
10 changed files with 140 additions and 173 deletions

View File

@@ -20,6 +20,18 @@ export type Tokens = {
clientUid: string
}
/**
* Parameters to run the chat query
* @param model the model to run
* @param ollama ollama api client
* @param msgHist message history
*/
export type ChatParams = {
model: string,
ollama: Ollama,
msgHist: UserMessage[]
}
/**
* Format for the messages to be stored when communicating when the bot
* @param role either assistant, user, or system