Adala icon indicating copy to clipboard operation
Adala copied to clipboard

add base url for openai client

Open hawktang opened this issue 10 months ago • 1 comments

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

hawktang avatar Apr 04 '24 13:04 hawktang

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: @.***>

hawktang avatar Apr 26 '24 02:04 hawktang

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

matt-bernstein avatar Jun 21 '24 21:06 matt-bernstein

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

robot-ci-heartex avatar Jun 21 '24 22:06 robot-ci-heartex