cohere-ai / cohere-toolkit

Cohere Toolkit is a collection of prebuilt components enabling users to quickly build and deploy RAG applications.
MIT License
2.77k stars 353 forks source link

Not clear how to plug in the parameters for a connector #210

Closed heaversm closed 4 days ago

heaversm commented 3 months ago

What improvement(s) are you suggesting?

I am trying to decipher the process to use the connector tool within coral toolkit (or add my own tool).

I successfully built a custom connection to my google drive folder, and I can use the cohere python library to converse with my docs via the command line / curl etc. But I cannot figure out how to do this within the cohere toolkit.

From the connector retriever source code, the instructions are:

"""
Plug in your Connector configuration here. For example:

Url: http://example_connector.com/search
Auth: Bearer token for the connector

More details: https://docs.cohere.com/docs/connectors
"""

class ConnectorRetriever(BaseTool):

    def __init__(self, url: str, auth: str):
        self.url = url
        self.auth = auth

But these instructions don't make sense - putting the Url and Auth inside this comment would do nothing. And I've tried hard coding these values into self.url = [my_url] and self.auth = [my_auth] but the toolkit throws a connection error using the connector retriever. This happens despite the fact that I can do a curl request using that exact same endpoint and values.

image

The connector retriever itself in the tools menu has no corresponding field to specify what you're connecting to, but it seems like you could set things up so someone could just plug in a cohere compatible API endpoint within the UI here and facilitate the connection.

I feel like more information or a better process is needed in order to use the connector retriever, or implement custom tools, and deploy an extrapolated version of the quick start connectors to a public endpoint. I've attempted to surface these questions on Discord but things seem similarly opaque. Maybe you could do a tutorial video?

Additional information

No response

BeatrixCohere commented 3 months ago

Hi, Thank you for the feedback, I will look at improving the documentation around connectors. For now what type of auth are you using with the connector?

heaversm commented 3 months ago

Thanks @BeatrixCohere - I am using Service to Service Authentication.

tianjing-li commented 4 days ago

I have docs updating how to add tool auth now in this PR #792 , closing this