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

LLM wrapper for Databricks #5142

Merged
merged 15 commits into from
May 26, 2023
Merged

LLM wrapper for Databricks #5142

merged 15 commits into from
May 26, 2023

Conversation

mengxr
Copy link
Contributor

@mengxr mengxr commented May 23, 2023

This PR adds LLM wrapper for Databricks. It supports two endpoint types:

  • serving endpoint
  • cluster driver proxy app

An integration notebook is included to show how it works.

cc: @hwchase17 @agola11 @gengliangwang

exc_info=True)
return context

def get_default_host():
Copy link
Contributor

Choose a reason for hiding this comment

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

I will make a follow-up to create Databricks utility methods for getting the host and api_token.

@dev2049 dev2049 added the 03 enhancement Enhancement of existing functionality label May 23, 2023
@mengxr mengxr changed the title [WIP] LLM wrapper for Databricks endpoints LLM wrapper for Databricks endpoints May 24, 2023
@mengxr mengxr force-pushed the databricks-llm branch 4 times, most recently from 5d00c19 to 350db0f Compare May 24, 2023 03:38
@gengliangwang
Copy link
Contributor

LGTM except for some minor comments 👍

@dev2049 dev2049 added the llms label May 24, 2023
Copy link
Contributor

@gengliangwang gengliangwang left a comment

Choose a reason for hiding this comment

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

LGTM except for two minor comments

@mengxr mengxr changed the title LLM wrapper for Databricks endpoints LLM wrapper for Databricks May 24, 2023
@mengxr
Copy link
Contributor Author

mengxr commented May 24, 2023

@dev2049 I addressed your comments. This is ready for another pass. Thanks!!

@dev2049 dev2049 merged commit aec642f into langchain-ai:master May 26, 2023
@dev2049
Copy link
Contributor

dev2049 commented May 26, 2023

thanks @mengxr @gengliangwang!

host = values["host"]
cluster_id = values["cluster_id"]
port = values["cluster_driver_port"]
api_url = f"https://{host}/driver-proxy-api/o/0/{cluster_id}/{port}"

Choose a reason for hiding this comment

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

@mengxr This might have a problem with the databricks driver proxy api with /o/0. The databricks repl context provided apiUrl is something like http://oregon.staging.databricks.com/. From my set up it seems that this does not work with the /o/0.

Choose a reason for hiding this comment

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

This works fine with databricks notebook context's url address. Resolve now.

@danielchalef danielchalef mentioned this pull request Jun 5, 2023
Undertone0809 pushed a commit to Undertone0809/langchain that referenced this pull request Jun 19, 2023
This PR adds LLM wrapper for Databricks. It supports two endpoint types:
* serving endpoint
* cluster driver proxy app

An integration notebook is included to show how it works.


Co-authored-by: Davis Chase <[email protected]>
Co-authored-by: Gengliang Wang <[email protected]>
Co-authored-by: Dev 2049 <[email protected]>
This was referenced Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
03 enhancement Enhancement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants