Skip to content

Commit

Permalink
Remove OpenAI import and add ChatOpenAI import
Browse files Browse the repository at this point in the history
  • Loading branch information
koganei committed Mar 9, 2024
1 parent 0e9d506 commit 0899b3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

import click
import requests
from langchain import OpenAI, LLMChain, PromptTemplate
from langchain import LLMChain, PromptTemplate
from langchain_openai import ChatOpenAI
from loguru import logger


Expand Down Expand Up @@ -76,7 +77,7 @@ def get_review(
chunked_diff_list = chunk_string(input_string=diff, chunk_size=prompt_chunk_size)
# Get summary by chunk
chunked_reviews = []
llm = OpenAI(
llm = ChatOpenAI(
openai_api_key=os.getenv("OPENAI_API_KEY"),
model="gpt-3.5-turbo",
temperature=0.2
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ loguru==0.7.0
requests==2.28.2

langchain==0.1.11
langchain-openai==0.0.8
huggingface_hub==0.16.4
openai==1.13.3

0 comments on commit 0899b3f

Please sign in to comment.