-
Notifications
You must be signed in to change notification settings - Fork 12
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
chore: refactor configs #348
Conversation
Note(s) for PR Auther:
Note(s) for PR Reviewer(s):
|
proxy_client: BaseProxyClient | None = None | ||
|
||
|
||
def get_gen_ai_proxy_client() -> BaseProxyClient: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: you can use lru_cache
if you want to avoid global variable. You can search other places of companion that is used.
@lru_cache(maxsize=1)
def init_proxy_client() -> BaseProxyClient:
"""Initialize the proxy client for the GenAI Hub only once."""
return get_proxy_client("gen-ai-hub")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a comment, you don't have to do it now.
We need to share the model logic from a shared package. There is an issue already we'll do it later.
Description
Changes proposed in this pull request:
.env.test
file.Related issue(s)