Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
yushengsu-thu committed May 21, 2023
1 parent 82c85e0 commit 71dd784
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agentverse/llms/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class OpenAIChat(BaseChatModel):
def __init__(self, max_retry: int = 3, **kwargs):
args = OpenAIChatArgs()
args = args.dict()

for k, v in args.items():
args[k] = kwargs.pop(k, v)
if len(kwargs) > 0:
Expand All @@ -111,6 +112,7 @@ def generate_response(self, prompt: str) -> LLMResult:
)

async def agenerate_response(self, prompt: str) -> LLMResult:

messages = self._construct_messages(prompt)
try:
response = await openai.ChatCompletion.acreate(
Expand Down

0 comments on commit 71dd784

Please sign in to comment.