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:
Matt Williams 2023-12-22 09:10:41 -08:00 committed by GitHub
parent 291700c92d
commit 5a85070c22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 346 additions and 101 deletions

View file

@ -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)