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

adding support for anthropic, azure, cohere, llama2 #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions hacker_news/news.py
Expand Up @@ -4,7 +4,8 @@
import re
import time
from json import JSONDecodeError

import litellm
from litellm import completion
import openai
from slugify import slugify
from summarizer import Summarizer
Expand Down Expand Up @@ -193,7 +194,7 @@ def openai_complete(self, prompt, need_json):
)
answer = resp['choices'][0]['text'].strip()
else:
resp = openai.ChatCompletion.create(
resp = completion(
messages=[
{'role': 'user', 'content': prompt},
],
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Expand Up @@ -21,4 +21,5 @@ python-dotenv==1.0.0
python_slugify==8.0.1
sqlalchemy==2.0.19
psycopg2==2.9.6
humanize==4.7.0
humanize==4.7.0
litellm==0.1.381