HumanSignal / Adala

Adala: Autonomous DAta (Labeling) Agent framework
https://humansignal.github.io/Adala/
Apache License 2.0
981 stars 77 forks source link

add base url for openai client #84

Closed hawktang closed 5 months ago

hawktang commented 8 months ago

add base url for openai client to support customer url in future

hawktang commented 7 months ago

Hi Niklub,

It refer to something like https://api.openai.com/v1/

Allow to change it future can make adala support models through apps like litellm proxy.

Peter Ze TANG (汤赜)

On Thu, Apr 25, 2024 at 6:25 PM niklub @.***> wrote:

@.**** requested changes on this pull request.

In adala/runtimes/_openai.py https://github.com/HumanSignal/Adala/pull/84#discussion_r1579240477:

@@ -167,7 +167,10 @@ class OpenAIChatRuntime(Runtime):

 @computed_field
 def _client(self) -> OpenAI:
  • return OpenAI(api_key=self.openai_api_key)
  • return OpenAI(
  • api_key=self.openai_api_key,
  • base_url=DEFAULT_CREATE_COMPLETION_URL

Does the base URL refer to the completion endpoint but not something like https://api.openai.com/v1 ?

— Reply to this email directly, view it on GitHub https://github.com/HumanSignal/Adala/pull/84#pullrequestreview-2022121285, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPJIZY5CS4QUF3EUBFZBVLY7DKYRAVCNFSM6AAAAABFXJK2ZSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDAMRSGEZDCMRYGU . You are receiving this because you authored the thread.Message ID: @.***>

matt-bernstein commented 5 months ago

Hi @hawktang , thanks for the PR! Apologies for the long delay, but we've updated this change and merged it in https://github.com/HumanSignal/Adala/pull/145

robot-ci-heartex commented 5 months ago

Commit https://github.com/HumanSignal/infra/commit/dfdd6b61ae77de50a8a42732626c1bc29651e675 is created.