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
OpenDAS
ollama
Commits
c279f963
Commit
c279f963
authored
Jul 16, 2024
by
Michael Yang
Browse files
remove ToolCall from GenerateResponse
parent
499e87c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
8 deletions
+0
-8
api/types.go
api/types.go
+0
-3
server/routes.go
server/routes.go
+0
-5
No files found.
api/types.go
View file @
c279f963
...
@@ -405,9 +405,6 @@ type GenerateResponse struct {
...
@@ -405,9 +405,6 @@ type GenerateResponse struct {
// Response is the textual response itself.
// Response is the textual response itself.
Response
string
`json:"response"`
Response
string
`json:"response"`
// ToolCalls is the list of tools the model wants to call
ToolCalls
[]
ToolCall
`json:"tool_calls,omitempty"`
// Done specifies if the response is complete.
// Done specifies if the response is complete.
Done
bool
`json:"done"`
Done
bool
`json:"done"`
...
...
server/routes.go
View file @
c279f963
...
@@ -275,11 +275,6 @@ func (s *Server) GenerateHandler(c *gin.Context) {
...
@@ -275,11 +275,6 @@ func (s *Server) GenerateHandler(c *gin.Context) {
}
}
r
.
Response
=
sb
.
String
()
r
.
Response
=
sb
.
String
()
if
toolCalls
,
ok
:=
m
.
parseToolCalls
(
sb
.
String
());
ok
{
r
.
ToolCalls
=
toolCalls
r
.
Response
=
""
}
c
.
JSON
(
http
.
StatusOK
,
r
)
c
.
JSON
(
http
.
StatusOK
,
r
)
return
return
}
}
...
...
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