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
921406f7
Unverified
Commit
921406f7
authored
Nov 08, 2023
by
Ikko Eltociear Ashimine
Committed by
GitHub
Nov 07, 2023
Browse files
Update client.py (#1026)
recieve -> receive
parent
c7047d73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/python-simplegenerate/client.py
examples/python-simplegenerate/client.py
+2
-2
No files found.
examples/python-simplegenerate/client.py
View file @
921406f7
...
...
@@ -17,7 +17,7 @@ def generate(prompt, context):
for
line
in
r
.
iter_lines
():
body
=
json
.
loads
(
line
)
response_part
=
body
.
get
(
'response'
,
''
)
# the response streams one token at a time, print that as we rec
i
eve it
# the response streams one token at a time, print that as we rece
i
ve it
print
(
response_part
,
end
=
''
,
flush
=
True
)
if
'error'
in
body
:
...
...
@@ -35,4 +35,4 @@ def main():
print
()
if
__name__
==
"__main__"
:
main
()
\ No newline at end of file
main
()
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