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

Difference between the variable names in .env? #112

Open
magedhelmy1 opened this issue Jul 24, 2023 · 7 comments
Open

Difference between the variable names in .env? #112

magedhelmy1 opened this issue Jul 24, 2023 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@magedhelmy1
Copy link

magedhelmy1 commented Jul 24, 2023

Hi, can you please give an explanation on

  • why we need the OpenAPI key and the Azure open API key?
  • What is the AZURE_OPENAI_API_INSTANCE_NAME and how is the different than the AZURE_OPENAI_API_DEPLOYMENT_NAME
  • What is the difference between this repo and the new repo you created called VectorHub
NEXT_PUBLIC_CHAT_FILES_MAX_SIZE=0
NEXT_PUBLIC_CHAT_FILES_UPLOAD_PATH=public/uploads# if you want to deploy on vercel, please use /tmp folder
SUPABASE_SERVICE_ROLE_KEY=xxxx
SUPABASE_URL=https://xxxx.supabase.co
OPENAI_TYPE=OPENAI# OPENAI_TYPE=AZURE_OPENAI
OPENAI_API_KEY=sk-xxx
OPENAI_API_MODEL=gpt-3.5-turbo
AZURE_OPENAI_API_KEY=
AZURE_OPENAI_API_DEPLOYMENT_NAME=
AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME=
AZURE_OPENAI_API_INSTANCE_NAME=
AZURE_OPENAI_API_VERSION=2023-05-15#default
@guangzhengli
Copy link
Owner

  1. Only one OpenAI API and Azure OpenAI API key needs to be selected. If OPENAI_TYPE=OPENAI is selected, OPENAI_API_KEY needs to be provided; if AZURE_OPENAI is selected, other environment variables related to AZURE_OPENAI are required. Of course, you can also choose not to enter the environment variables and input them on the front-end page. and this is an open source project and we cannot provide free OpenAPI services.

  2. If you deploy the OpenAI Service in Azure, it will create an instance resource with an instance name, and then you can choose to deploy different models, such as gpt-3.5-turbo, text-embeddings, and other different models. Each deployed model will get a deployment name. In the production environment of ChatFiles, AZURE_OPENAI_API_DEPLOYMENT_NAME deploys the gpt-3.5-turbo model, and AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME deploys the text-embedding-ada-002 model.

  3. This repository mainly focuses on uploading files and providing AI Q&A services, similar to current websites such as ChatPDF, but VectorHub will provide more capabilities, such as GPT embedding based on webpage URLs, helps you build a platform for chat with knowledge bases AI based on your data. and more AI scenarios such as AI search and SDK & API integrating with your website will be supported in the future.

@magedhelmy1
Copy link
Author

Interesting! Thank you and I ran into the following bug. Basically, when I type without submitting a file.

Screenshot 2023-07-24 at 21 01 41

@guangzhengli guangzhengli added the bug Something isn't working label Jul 25, 2023
@guangzhengli guangzhengli self-assigned this Jul 25, 2023
@guangzhengli
Copy link
Owner

Yes, this is a known bug. Sometimes it outputs information in this format and is not very stable. It's related to LangChian Bug, and I will try to fix it.

@magedhelmy1
Copy link
Author

Thank you for creating a ticket! I shall close this ticket then since you are tracking it from somewhere else. Thanks again and keep the good work up!

@magedhelmy1
Copy link
Author

I saw Github moved this automatically to close! So I reopened it just in case!

@magedhelmy1
Copy link
Author

magedhelmy1 commented Jul 26, 2023

Do you know where does it get the below message from? Although I have send an empty message (AKA single space click)
I am trying to think how can we workaround this bug.

Screenshot 2023-07-27 at 00 28 21

@guangzhengli
Copy link
Owner

This is because I used the default Prompt of LangChain.JS framework, which carries default messages such as HumanMessage and SystemMessage. The reason why GPT previously returned JSON fixed format instead of String was also due to this reason. I am currently fixing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants