-
Notifications
You must be signed in to change notification settings - Fork 61k
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
[Bug] BASE_URL Error1002 #4474
Comments
Please provide a callable, complete, domain-desensitized url |
Please verify that your available urls match our url concatenation rules |
yes it's |
@A-l-an would you mind share the original error response? |
|
So, can you successfully get a response using the reference code provided by your school? |
Yes, it worked successfully on the reference code . |
So it might be necessary to inquire with your school whether they have imposed restrictions on visiting IPs, because the program deployed by Vercel makes requests using the IPs provided by Vercel. You can try downloading the released software of NextChat and use it on your computer to see if the problem still exists. |
sorry, but how should I fix this? |
You can download the release to use the api if you can run the reference code. release is here |
in this case, should I change the OpenAI Endpoint to my school's? cause when I did, another error showed up: |
It's confusing. |
It's confusing. |
sorry,it's my fault,I closed this issue by mistake,ignore it |
I think there might be something wrong with the header handler. Also, I'm surprised that your school allows the use of AI ? |
sorry what do you mean by header handler? and yes we are encouraged to use AI tools. |
yeah, all I did just replace the Endpoint and type in my API key... |
Here's an example: Also, can you take a screenshot of it and censor/hide any contained API keys? |
and censor/hide any other value contained sensitive as well |
here it is, I do not know what went wrong |
It could be an issue with your school's https://gpt-api.【school】.edu.cn/v1/chat/completions REST APIs (e.g., permissions related to CORS,region blocked because it used vercel to request into your school REST APIs). The request header is correct. |
but I also tried to download the release version and use the api locally before. and another error showed up: |
try this method: |
in this case, should I fill in |
If your school's REST APIs support |
the original reference url is https://gpt-api.【school】.edu.cn**/v1/chat/completions.** |
Yes, it seems to be an issue related to permissions(e.g, |
They said the system must access to GPT-API by Campus Network (specified SSID required ). |
I think if you can run the reference code in your PC, then you can run it on the release program keeping the same network setting. They should not have any essential differences, both are sending requests to a third-party endpoint. What information will this return using |
it returns: {
"error": true,
"message": "Load failed"
} |
which version |
which version |
Perhaps the API offered by your school does not support for streaming responses? You could conduct a test using the subsequent illustration:
|
Ok. I got it. The Campus GPT API has been re – encapsulated so I could only access it by the reference code .... Thanks for your help. |
Bug Description
Originally posted by @QAbot-zh in #4441 (comment)
It doesn't work. still shows error code: 1002.
The reference code my school provide is as below:
url = "https://gpt-api.【school】.edu.cn/v1/chat/completions"
headers = { "Content-Type": "application/json", "Authorization": "Bearer xxx" }
data = { "model": "gpt-4", # "gpt-3.5-turbo" version in gpt-3.5-turbo-1106, "gpt-4" version in gpt-4-1106-version (gpt-4-vision-preview is NOT available in azure openai), "gpt-3.5-turbo-16k", "gpt-4-32k" "messages": [{"role": "user", "content": "Q"}], "temperature": 0.7 }
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
I supposed that error is because of the different usage of the api? or sth else?
Steps to Reproduce
/
Expected Behavior
/
Screenshots
No response
Deployment Method
Desktop OS
MacOS
Desktop Browser
Chrom
Desktop Browser Version
No response
Smartphone Device
No response
Smartphone OS
No response
Smartphone Browser
No response
Smartphone Browser Version
No response
Additional Logs
No response
The text was updated successfully, but these errors were encountered: