mirror of
https://github.com/ollama/ollama-python.git
synced 2026-08-20 11:49:52 +00:00
Merge pull request #445 from ollama/mxyng/hatch
use hatch instead of poetry
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user