Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Struggling to run using only a local model #27

Open
electricazimuth opened this issue Oct 2, 2024 · 0 comments
Open

Struggling to run using only a local model #27

electricazimuth opened this issue Oct 2, 2024 · 0 comments

Comments

@electricazimuth
Copy link

Looks like open ai is hardcoded here, I think it should be referencing the selected model I've setup in my settings (a local server on my network)

def generate(prompt, engine, api_base, api_key):
openai.base_url, openai.api_key = api_base + '/', api_key
#print('calling engine', engine, 'at endpoint', openai.api_base)
#print('prompt:', prompt)
response = openai.completions.create(prompt=prompt,
max_tokens=1,
n=1,
temperature=0,
logprobs=100,
model=engine).dict()
return response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant