Skip to content

Add support for Azure, Palm, Anthropic, Cohere, Hugging Face Llama2 70b Models - using litellm #331

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

Open
wants to merge 1 commit into
base: main
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion classifiers/llm/gpt_classifier/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import openai
from litellm import completion
from pydantic import BaseModel
from typing import List

Expand Down Expand Up @@ -27,7 +28,7 @@ def gpt_classifier(req: GptClassifierModel):

openai.api_key = req.apiKey
try:
response = openai.ChatCompletion.create(
response = completion(
model="gpt-3.5-turbo",
messages=[
{
Expand Down
3 changes: 2 additions & 1 deletion extractors/llm/gpt_information_extraction/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import re
import ast
import openai
from litellm import completion
from extractors.util.spacy import SpacySingleton
from pydantic import BaseModel

Expand Down Expand Up @@ -28,7 +29,7 @@ def gpt_information_extraction(req: GptInformationExtractionModel):
"""Uses OpenAI's GPT model to extract keyword from a text."""
openai.api_key = req.apiKey
try:
response = openai.ChatCompletion.create(
response = completion(
model = "gpt-3.5-turbo",
messages = [
{
Expand Down
3 changes: 2 additions & 1 deletion generators/llm/gpt_grammar_correction/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import openai
from litellm import completion
from pydantic import BaseModel

INPUT_EXAMPLE = {
Expand All @@ -21,7 +22,7 @@ def gpt_grammar_correction(req: GptGrammarCorrectionModel):
"""GPT-3.5 model which can be used to correct grammar."""
openai.api_key = req.apiKey
try:
response = openai.ChatCompletion.create(
response = completion(
model="gpt-3.5-turbo",
messages=[
{
Expand Down
3 changes: 2 additions & 1 deletion generators/llm/gpt_tldr_summarization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import openai
from pydantic import BaseModel
from litellm import completion

INPUT_EXAMPLE = {
"apiKey": "<API_KEY_GOES_HERE>",
Expand All @@ -21,7 +22,7 @@ def gpt_tldr_summarization(req: GptTldrSummarizationModel):
"""GPT-3.5 model which can be used to summarize text inputs."""
openai.api_key = req.apiKey
try:
response = openai.ChatCompletion.create(
response = completion(
model="gpt-3.5-turbo",
messages=[
{
Expand Down