-
Notifications
You must be signed in to change notification settings - Fork 178
Add support for passing additional kwargs when instantiating an OpenAI client for Databricks model serving #1025
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
Add support for passing additional kwargs when instantiating an OpenAI client for Databricks model serving #1025
Conversation
…I client for Databricks model serving Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
| } | ||
|
|
||
| # Update with any additional parameters passed by the user | ||
| client_params.update(kwargs) |
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.
do we want to make it so you can't override the default client_params since it'll break compatibility w/ databricks model serving? we could also document what the defaults are
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.
Yeah, seems safe to block overriding those & throw to start
bbqiu
left a comment
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.
lgtm after discussing the one comment, thank you for adding this!
Signed-off-by: Sid Murching <[email protected]>
Signed-off-by: Sid Murching <[email protected]>
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
hectorcast-db
left a comment
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.
LGTM
## Release v0.65.0 ### New Features and Improvements * Added support for passing additional kwargs to `WorkspaceClient().serving_endpoints.get_open_ai_client()` ([#1025](#1025)). Users can now pass standard OpenAI client parameters like `timeout` and `max_retries` when creating an OpenAI client for Databricks Model Serving. ### API Changes * Added `comment` field for `databricks.sdk.service.dashboards.GenieSendMessageFeedbackRequest`. * [Breaking] Added `rating` field for `databricks.sdk.service.dashboards.GenieSendMessageFeedbackRequest`. * Added `effective_enable_pg_native_login` and `enable_pg_native_login` fields for `databricks.sdk.service.database.DatabaseInstance`. * Added `task_retry_mode` field for `databricks.sdk.service.jobs.Continuous`. * Added `source_configurations` field for `databricks.sdk.service.pipelines.IngestionPipelineDefinition`. * Added `app_id`, `app_id_set`, `auth_secret`, `auth_secret_set`, `channel_url`, `channel_url_set`, `tenant_id` and `tenant_id_set` fields for `databricks.sdk.service.settings.MicrosoftTeamsConfig`. * Added `ensure_reranker_compatible` field for `databricks.sdk.service.vectorsearch.GetIndexRequest`. * Added `reranker` field for `databricks.sdk.service.vectorsearch.QueryVectorIndexRequest`. * [Breaking] Changed `create_clean_room_asset_review()` method for [w.clean_room_assets](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/cleanrooms/clean_room_assets.html) workspace-level service with new required argument order. * [Breaking] Changed `send_message_feedback()` method for [w.genie](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/dashboards/genie.html) workspace-level service with new required argument order. * Changed `notebook_review` field for `databricks.sdk.service.cleanrooms.CreateCleanRoomAssetReviewRequest` to no longer be required. * [Breaking] Changed `features` field for `databricks.sdk.service.ml.FeatureList` to type list[`databricks.sdk.service.ml.LinkedFeature`] dataclass. * [Breaking] Removed `feedback_rating` and `feedback_text` fields for `databricks.sdk.service.dashboards.GenieSendMessageFeedbackRequest`.
What changes are proposed in this pull request?
Per customer request, adds support for passing additional optional kwargs to
databricks.sdk.WorkspaceClient().get_open_ai_client(). This enables use cases like specifying a custom timeout and retry policy for latency-sensitive workloads, e.g:How is this tested?
Updated unit tests