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

OAI api refactor #391

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
Next Next commit
OAI api
  • Loading branch information
you-n-g committed Sep 29, 2024
commit 1fb935217f8ef0553d7e15fac7475cb3c32dc2fe
6 changes: 6 additions & 0 deletions rdagent/oai/llm_utils.py
Original file line number Diff line number Diff line change
@@ -235,6 +235,8 @@ def display_history(self) -> None:


class APIBackend:
# FIXME: (xiao) I think we should skip using self.xxxx
# We can use self.cfg directly. If it is hard to 兼容 different settings of backends. We can split it into multiple BaseSettings.
def __init__( # noqa: C901, PLR0912, PLR0915
self,
*,
@@ -382,6 +384,10 @@ def __init__( # noqa: C901, PLR0912, PLR0915
self.use_gcr_endpoint = self.cfg.use_gcr_endpoint
self.retry_wait_seconds = self.cfg.retry_wait_seconds

def list_available_deployments(self):
if self.use_azure:
# TODO:

def build_chat_session(
self,
conversation_id: str | None = None,