Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
orangecat
ollama
Commits
045b855d
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "6c7fad7ec8b2417c92326804e1751658874fd43b"
Commit
045b855d
authored
Dec 10, 2023
by
Jeffrey Morgan
Browse files
fix error on accumulating final chat response
parent
32064a06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
server/routes.go
server/routes.go
+4
-1
No files found.
server/routes.go
View file @
045b855d
...
@@ -1025,7 +1025,10 @@ func ChatHandler(c *gin.Context) {
...
@@ -1025,7 +1025,10 @@ func ChatHandler(c *gin.Context) {
for
resp
:=
range
ch
{
for
resp
:=
range
ch
{
switch
r
:=
resp
.
(
type
)
{
switch
r
:=
resp
.
(
type
)
{
case
api
.
ChatResponse
:
case
api
.
ChatResponse
:
sb
.
WriteString
(
r
.
Message
.
Content
)
if
r
.
Message
!=
nil
{
sb
.
WriteString
(
r
.
Message
.
Content
)
}
final
=
r
final
=
r
case
gin
.
H
:
case
gin
.
H
:
if
errorMsg
,
ok
:=
r
[
"error"
]
.
(
string
);
ok
{
if
errorMsg
,
ok
:=
r
[
"error"
]
.
(
string
);
ok
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment