Skip to content

ChatDatabricks class won't parse endpoint correctly #36

@MRWhitehead

Description

@MRWhitehead

Re: Notebook 01-First-Step-RAG-On-Databricks

I cannot successfully substitute my own Databricks serving endpoint using this method and the default public endpoint is not available.

Ideally, I should be able to assign my Databricks URI as 'target_uri', and my endpoint name as 'endpoint'

for example:

model = ChatDatabricks(
    target_uri="https://adb-427704812XXXXXXX.12.azuredatabricks.net"
    endpoint="dbrx_instruct_dbdemo_endpoint"
    extra_params={"temperature": 0.01, "max_tokens": 500}
)

Should produce https://adb-427704812XXXXXXX.12.azuredatabricks.net/serving-endpoints/dbrx_instruct_dbdemo_endpoint/invocations which is my model serving endpoint.

But first there is a validation check which will fail, but can be bypassed ok by redefinition.

def _validate_uri(self) -> None: if self.target_uri == "databricks": return

Then after bypassing that, the function inserts string '/endpoints' into the URL between URI and endpoint name, invalidating the endpoint URL.

I cannot work out where the Class is inheriting that behaviour, and therefore can't work around it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions