-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Added gpt_action_mongodb_vector.md and modified registry.yaml for Mon… #1424
base: main
Are you sure you want to change the base?
Conversation
…goDB vector support
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.
added a few comments
|
||
### Middleware Function | ||
|
||
To create a Google Run Function, follow the steps in the [GCP Functions Action](https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/gpt_middleware_google_cloud_function) cookbook. |
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.
would rename to "GPT Actions library (Middleware) - Google Cloud Function" (or other providers – we don't require GCP, right?)
|
||
## Application Information | ||
|
||
### Application Key Links |
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.
I guess we're trying to remove those links or have them as hyperlink in the description to avoid verbosity. The Canvas LMS cookbook as been revamped to show this: https://cookbook.openai.com/examples/chatgpt/gpt_actions_library/gpt_action_canvas / https://github.com/openai/openai-cookbook/blob/main/examples/chatgpt/gpt_actions_library/gpt_action_canvas.md
Your `.env` file should contain the following values | ||
|
||
``` | ||
OPENAI_API_KEY= |
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.
could we include example of format (e.g: sk-xxxx) – if useful ?
also can we point on how to actually pass those variables to the function (or at least indicating to set-up those variables in the middleware env) ?
|
||
### Create vector index | ||
|
||
Ensure that your MongoDB collection has a vector index. Here is an example of how to create one |
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 have a script to run this on the MONGODB_URI or a command line to connect to it?
|
||
Below is an example of what connecting to this Middlware might look like. You'll need to insert your application's & function's information in this section. | ||
|
||
```javascript |
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.
this would be ```yaml
|
||
### In ChatGPT (refer to Step 2 in the Getting Started Example) | ||
|
||
In ChatGPT, click on "Authentication" and choose **"OAuth"**. Enter in the information below. |
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.
Wouldn't we want to leverage a MongoDB Oauth connection, if possible? https://www.mongodb.com/docs/atlas/security-oidc/
Does it enable all authenticated users to Google (regardless of their directory) to run the function?
|
||
### Test the GPT | ||
|
||
You are now ready to test out the GPT. You can enter a simple prompt like "I want to watch movies that involve spies and world war" and expect to see the following: |
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.
I imagine we'd like to load a dataset for this to be able to give that answer?
MongoDB Vector Database
Summary
Added in the ability to perform a semantic search in MongoDB Vector Search
Motivation
We were planning to include a cookbook for a vector database like Pinecone. I decided to use MongoDB because it has a larger market share
For new content
When contributing new content, read through our contribution guidelines, and mark the following action items as completed:
We will rate each of these areas on a scale from 1 to 4, and will only accept contributions that score 3 or higher on all areas. Refer to our contribution guidelines for more details.