Skip to content

Commit

Permalink
Merge pull request #5 from plasma-umass/use_model_prefix
Browse files Browse the repository at this point in the history
Added Ollama support; also linked in paper.
  • Loading branch information
emeryberger committed Mar 28, 2024
2 parents 5d12bea + 8dccd2a commit 1b75147
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/coverup/coverup.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,14 @@ def pl(item, singular, plural = None):
log_write(seg, "Too many attempts, giving up")
break

if not (response := await do_chat(seg, {'model': args.model, 'messages': messages,
'temperature': args.model_temperature})):
completion = {'model': args.model,
'messages': messages,
'temperature': args.model_temperature}

if "ollama" in args.model:
completion["api_base"] = "http://localhost:11434"

if not (response := await do_chat(seg, completion)):
log_write(seg, "giving up")
break

Expand Down

0 comments on commit 1b75147

Please sign in to comment.