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

Monger Backward Compatibility Support #2

Merged
merged 1 commit into from
Oct 5, 2023
Merged
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
6 changes: 4 additions & 2 deletions numexa/api_resources/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def post(
) -> Union[ResponseT, StreamT]:
if path in [NumexaApiPaths.CHAT_COMPLETION, NumexaApiPaths.COMPLETION]:
body = cast(List[Body], body)
opts = self._construct(
# todo: change _construct_direct to _construct
opts = self._construct_direct(
method="post",
url=path,
body=body,
Expand Down Expand Up @@ -391,7 +392,8 @@ def _request(
) -> Union[ResponseT, StreamT]:
# proxy on
if not os.environ.get("NUMEXA_PROXY"):
request_list = self._build_request(options)
# todo: change _build_request_direct to _build_request
request_list = self._build_request_direct(options)
# proxy off
else:
request_list = self._build_request_direct(options)
Expand Down