Skip to content
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 autopr/actions/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Any, Optional, Literal

import openai
from litellm import acompletion
import openai.error
import tenacity
from pydantic import BaseModel
Expand Down Expand Up @@ -175,7 +176,7 @@ def build_prompt_and_instructions(self, inputs: Inputs) -> tuple[str, str]:
)
async def invoke_openai(self, inputs: Inputs, prompt: str, instructions: str) -> str:
self.log.info("Invoking OpenAI API...")
result = await openai.ChatCompletion.acreate(
result = await acompletion(
messages=[
{
"role": "system",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pyyaml = "^6.0"
tiktoken = "^0.4.0"
jinja2 = "^3.1.2"
openai = "^0.27.9"
litellm = "^0.1.400"

[tool.poetry.group.test.dependencies]
pyright = "^1.1.306"
Expand Down