Skip to content

Improve ergonomics of ClientRegistry #766

@hellovai

Description

@hellovai

Currently users have to do a lot of work to use dynamic clients.

instead we could look into a more type-safe approach such as:

cr = b.ClientRegistry() cr.ExistingClient.ExtractResume(...) client = cr.add_llm_client(...) client.ExtractResume(...) client = cr.get_llm_client(...) client.ExtractResume(...)

User requests:

Is there a way to set `temperature` per request without modifying whole client via `Client Registry`?

@pySilver in #892 (comment)

Hello, I use BAML with Azure Openai, which currently uses an auth token that expires after a certain amount of time, so I'd like to limit the client definitions in my python code, instead of having to use clients.baml.

Currently, I define the client in clients.baml, and use dummy variables for the credentials, and in my python code, I overwrite them with the correct credentials at runtime. Is there a cleaner way to accomplish this?

@shoang22 in #1330

Please, add methods for requesting state of a Client Registry 🙏 Specifically:

  1. Something like get_primary to get the current primary client spec;
  2. Something like get_clients to list all registered clients.

@zeionara in #1551

is there an easy way to override the client with another predefined client when calling a BAML function without having to create the entire client in code and using a client registry? use case: we want to evaluate a few models from different providers for a particular prompt to see which one passes all checks.

emil in discord

User requests:

Is there a way to set `temperature` per request without modifying whole client via `Client Registry`?

@pySilver in #892 (comment)

Hello, I use BAML with Azure Openai, which currently uses an auth token that expires after a certain amount of time, so I'd like to limit the client definitions in my python code, instead of having to use clients.baml.

Currently, I define the client in clients.baml, and use dummy variables for the credentials, and in my python code, I overwrite them with the correct credentials at runtime. Is there a cleaner way to accomplish this?

@shoang22 in #1330

Please, add methods for requesting state of a Client Registry 🙏 Specifically:

  1. Something like get_primary to get the current primary client spec;
  2. Something like get_clients to list all registered clients.

@zeionara in #1551

is there an easy way to override the client with another predefined client when calling a BAML function without having to create the entire client in code and using a client registry? use case: we want to evaluate a few models from different providers for a particular prompt to see which one passes all checks.

emil in discord

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions