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

Add support for Llama2, Palm, Cohere, Anthropic, Replicate, Azure Models - using litellm #13

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc_comments_ai/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import inquirer
from langchain import LLMChain, PromptTemplate
from langchain.chat_models import ChatOpenAI
from langchain.chat_models import ChatLiteLLM
from langchain.llms import LlamaCpp

from doc_comments_ai import utils
Expand Down Expand Up @@ -33,7 +33,7 @@ def __init__(
verbose=False,
)
else:
self.llm = ChatOpenAI(
self.llm = ChatLiteLLM(
temperature=0.9, max_tokens=max_tokens, model=model.value
)
self.template = (
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ python = "^3.9"
tree-sitter-languages = "^1.7.0"
tree-sitter = "^0.20.1"
python-dotenv = "^1.0.0"
langchain = "^0.0.271"
langchain = "^0.0.284"
litellm = "^0.1.697"
fynnfluegge marked this conversation as resolved.
Show resolved Hide resolved
tiktoken = "^0.4.0"
openai = "^0.27.8"
yaspin = "^3.0.0"
Expand Down