Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kakopappa/llama-chatgpt-mongo-vector-search-demo
Example of how to train using llamaindex, chatgpt and store embeddings in mongodb atlas vector search and ask questions later
https://github.com/kakopappa/llama-chatgpt-mongo-vector-search-demo
Last synced: about 1 month ago
JSON representation
Example of how to train using llamaindex, chatgpt and store embeddings in mongodb atlas vector search and ask questions later
- Host: GitHub
- URL: https://github.com/kakopappa/llama-chatgpt-mongo-vector-search-demo
- Owner: kakopappa
- Created: 2024-02-02T00:45:58.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-02T01:08:16.000Z (11 months ago)
- Last Synced: 2024-02-03T01:52:27.744Z (11 months ago)
- Language: TypeScript
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# llamaindex ChatGPT MongoDb Vector Search demo
This is an example of how to train using llamaindex, chatgpt, and then store the document embeddings in Mongodb Atlas Vector Search and ask questions about the content.
**You need ChatGPT and Mongodb Atlas API Keys** They are free.
1. Login to Mongodb Atlas and create a database: **llama**. Copy the connection string presented at the end.
1. rename .env.demo to .env and put the `OPENAI_API_KEY` key and `MONGO_URI` (from step 1)
2. run `ts-node llama-mongo-train.ts`
3. login to Mongodb Atlas and create the Vector index on `embedding`.`
{
"fields": [
{
"type": "vector",
"path": "embedding",
"numDimensions": 1536,
"similarity": "euclidean"
}
]
}
`4. run `ts-node llama-mongo-ask.ts` to ask questions. question is inside