Skip to content
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

[Fix] Fixing http_request open_ai_client mixin #870

Conversation

sunishsheth2009
Copy link

What changes are proposed in this pull request?

  • [Fix] Fixing http_request open_ai_client mixin

How is this tested?

https://dbc-436b86a5-6d5b.dev.databricks.com/editor/notebooks/2465247895264388?o=1593823105423000#command/7927901211745840

from databricks.sdk import WorkspaceClient
from databricks.sdk.service.serving import ExternalFunctionRequestHttpMethod

WorkspaceClient().serving_endpoints.http_request(
    conn="test_sql_slack",
    method=ExternalFunctionRequestHttpMethod.POST,
    path="/api/chat.postMessage",
    json={"channel": "C07MB25Q6H3", "text": "Hello!"}
)

Tried this and it works

Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 870
  • Commit SHA: 75e7ce829d0a036f10af6720746c142ebf874549

Checks will be approved automatically on success.

json=js.dumps(json),
params=js.dumps(params),
)
databricks.sdk.service.serving.ExternalFunctionResponse = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, this will change ALL calls to the original http_request. We must avoid these types of side effects. Even if we revert it after the call, it will cause issues in multi threaded environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants