Skip to content

Commit

Permalink
Update client.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RCW2000 authored Mar 2, 2024
1 parent 6a4f319 commit 3a3fe15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ollama/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import json
import requests

BASE_URL = os.environ.get('OLLAMA_HOST', 'http://localhost:11434')
#BASE_URL = os.environ.get('OLLAMA_HOST', 'http://localhost:11434')

# Generate a response for a given prompt with a provided model. This is a streaming endpoint, so will be a series of responses.
# The final response object will include statistics and additional data from the request. Use the callback function to override
# the default handler.
def generate(model_name, prompt, system=None, template=None, context=None, options=None, callback=None):
try:
url = f"{BASE_URL}/api/generate"
url = "http://localhost:11434/api/generate"
payload = {
"model": model_name,
"prompt": prompt,
Expand Down

0 comments on commit 3a3fe15

Please sign in to comment.