Merge pull request #445 from ollama/mxyng/hatch
test / test (push) Has been cancelled
test / lint (push) Has been cancelled

use hatch instead of poetry
This commit is contained in:
Michael Yang
2025-05-06 11:03:28 -07:00
committed by GitHub
parent 65f94b4fba
commit 5ae5f816bb
13 changed files with 424 additions and 837 deletions
+1 -4
View File
@@ -23,10 +23,7 @@ while True:
user_input = input('Chat with history: ')
response = chat(
'llama3.2',
messages=messages
+ [
{'role': 'user', 'content': user_input},
],
messages=[*messages, {'role': 'user', 'content': user_input}],
)
# Add the response to the messages to maintain the history
+1 -4
View File
@@ -8,10 +8,7 @@ from ollama import generate
latest = httpx.get('https://xkcd.com/info.0.json')
latest.raise_for_status()
if len(sys.argv) > 1:
num = int(sys.argv[1])
else:
num = random.randint(1, latest.json().get('num'))
num = int(sys.argv[1]) if len(sys.argv) > 1 else random.randint(1, latest.json().get('num'))
comic = httpx.get(f'https://xkcd.com/{num}/info.0.json')
comic.raise_for_status()