Merge remote-tracking branch 'origin/next' into openai
This commit is contained in:
@@ -455,7 +455,11 @@ export const useMessageOption = () => {
|
||||
)
|
||||
}
|
||||
|
||||
if (selectedPrompt) {
|
||||
const isTempSystemprompt =
|
||||
currentChatModelSettings.systemPrompt &&
|
||||
currentChatModelSettings.systemPrompt?.trim().length > 0
|
||||
|
||||
if (!isTempSystemprompt && selectedPrompt) {
|
||||
applicationChatHistory.unshift(
|
||||
new SystemMessage({
|
||||
content: [
|
||||
@@ -468,6 +472,19 @@ export const useMessageOption = () => {
|
||||
)
|
||||
}
|
||||
|
||||
if (isTempSystemprompt) {
|
||||
applicationChatHistory.unshift(
|
||||
new SystemMessage({
|
||||
content: [
|
||||
{
|
||||
text: currentChatModelSettings.systemPrompt,
|
||||
type: "text"
|
||||
}
|
||||
]
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
const chunks = await ollama.stream(
|
||||
[...applicationChatHistory, humanMessage],
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user