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
dd960d1d
"server/vscode:/vscode.git/clone" did not exist on "f91e9d282d73e09cdb876924412f2ed66212d736"
Commit
dd960d1d
authored
Jul 06, 2023
by
Michael Yang
Committed by
Jeffrey Morgan
Jul 06, 2023
Browse files
update generate response
parent
2c80eddd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
api/types.go
api/types.go
+0
-8
server/routes.go
server/routes.go
+2
-6
No files found.
api/types.go
View file @
dd960d1d
...
...
@@ -36,11 +36,3 @@ type GenerateRequest struct {
type
GenerateResponse
struct
{
Response
string
`json:"response"`
}
type
TokenResponse
struct
{
Choices
[]
TokenResponseChoice
`json:"choices"`
}
type
TokenResponseChoice
struct
{
Text
string
`json:"text"`
}
server/routes.go
View file @
dd960d1d
...
...
@@ -78,12 +78,8 @@ func generate(c *gin.Context) {
return
false
}
resp
:=
api
.
TokenResponse
{
Choices
:
[]
api
.
TokenResponseChoice
{
{
Text
:
token
,
},
},
resp
:=
api
.
GenerateResponse
{
Response
:
token
,
}
bts
,
err
:=
json
.
Marshal
(
resp
)
...
...
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