mirror of
https://github.com/ollama/ollama.git
synced 2025-05-13 03:16:47 +02:00
Update readmes, requirements, packagejsons, etc for all examples (#1452)
Most of the examples needed updates of Readmes to show how to run them. Some of the requirements.txt files had extra content that wasn't needed, or missing altogether. Apparently some folks like to run npm start to run typescript, so a script was added to all typescript examples which hadn't been done before. Basically just a lot of cleanup. Signed-off-by: Matt Williams <m@technovangelist.com>
This commit is contained in:
parent
291700c92d
commit
5a85070c22
26 changed files with 346 additions and 101 deletions
|
@ -24,7 +24,6 @@ def chat(messages):
|
|||
# the response streams one token at a time, print that as we receive it
|
||||
print(content, end="", flush=True)
|
||||
|
||||
|
||||
if body.get("done", False):
|
||||
message["content"] = output
|
||||
return message
|
||||
|
@ -32,9 +31,11 @@ def chat(messages):
|
|||
|
||||
def main():
|
||||
messages = []
|
||||
|
||||
|
||||
while True:
|
||||
user_input = input("Enter a prompt: ")
|
||||
if not user_input:
|
||||
exit()
|
||||
print()
|
||||
messages.append({"role": "user", "content": user_input})
|
||||
message = chat(messages)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue