Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
leftmove authored May 22, 2024
1 parent e1f60b5 commit 5d578bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,13 @@ with cria.Model() as ai:
#### Running A Managed Subprocess (Reccomended)

```python

# If it is the first time you start the program, ollama will start automatically
# If it is the second time (or subsequent times) you run the program, ollama will already be running

ai = cria.Cria(standalone=True, close_on_exit=False)
prompt = "Who is the CEO of OpenAI?"

# Ollama will already be running.

with cria.Model("llama2") as llama2:
response = llama2.generate("Who is the CEO of OpenAI?", stream=False)
print(response)
Expand All @@ -369,7 +371,7 @@ with cria.Model("llama3") as llama3:
print(response)

quit()
# Olama will keep running, and be used the next time this program starts.
# Despite exiting, olama will keep running, and be used the next time this program starts.
```

### Formatting
Expand Down

0 comments on commit 5d578bd

Please sign in to comment.