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

feat: created vector db and embeddings system #19

Merged
merged 5 commits into from
Nov 2, 2024

Conversation

cshafizadeh
Copy link
Contributor

  • Created a vectordb in Pinecone, with an instance of it created in "pineconeClient.ts".
  • Created OpenAI client that uses embeddings API to convert text parameter into vector array.
  • Created POST/GET routes for embeddings:
    • POST: takes provided text, converts it into an embedding using the openAiClient, and then uploads it to the pinecone db.
    • GET: Takes in user provided string and retrieves the most similar results from the pinecone db.

Note: I am unsure if people are able to create embeddings with the base tier of openAI. If this is the case, let me know and I will look into an open source embeddings model.

- Created a vectordb in Pinecone, with an instance of it created in "pineconeClient.ts".
- Created OpenAI client that uses embeddings API to convert text parameter into vector array.
- Created 2 routes within embeddings. One route takes provided text, converts it into an embedding using the openAiClient, and then uploads it to the pinecone db. The other route takes in user provided string and retrieves the most similar results from the pinecone db.
(obviously dont want to console log an api key in prod)
@cshafizadeh
Copy link
Contributor Author

It looks like the workflow does not like that there is no provided Pinecone API key (I am grabbing it from my local env file). A potential fix to this might be to store the Pinecone and OpenAI API keys as GitHub secrets and then assign the secrets to their respective environment variables inside the workflow.

@Nyumat
Copy link
Member

Nyumat commented Nov 2, 2024

It looks like the workflow does not like that there is no provided Pinecone API key (I am grabbing it from my local env file). A potential fix to this might be to store the Pinecone and OpenAI API keys as GitHub secrets and then assign the secrets to their respective environment variables inside the workflow.

Check your Discord DMs!

grabbing env veariables from github secrets.
@Nyumat Nyumat force-pushed the cshafizadeh-contributions branch from 13e82f8 to 015b7e4 Compare November 2, 2024 03:24
@Nyumat Nyumat force-pushed the cshafizadeh-contributions branch from 015b7e4 to 22721a7 Compare November 2, 2024 09:31
@Nyumat Nyumat merged commit e91ba05 into OSU-App-Club:main Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants