Giter VIP home page Giter VIP logo

gpt_api_free's Issues

python使用openai调用报错

https://api.chatanywhere.com.cn/v1
以上url不被openai所支持,500报错
以下为测试代码:

import openai

openai.api_base = "https://api.chatanywhere.com.cn/v1"
openai.api_key = "sk-0PfcSdT723UR44igwVxvEWvLoZJgi0FJyZWy0WCCATp5ka2a"

model_engine = "gpt-3.5-turbo"
prompt = "hello"

completions = openai.Completion.create(
    engine=model_engine,
    prompt=prompt,
    max_tokens=1024,
    temperature=0.8
)

message = completions.choices[0].text
print(message)

报错:openai.error.APIError: HTTP code 500 from API (Request method 'POST' not supported)

密钥失效

你好,我今天刚刚用这个项目申请了免费key,但是key目前已经失效了
程序报错:Incorrect API key provided: sk-EWUgz***************************************HVxj

我想用java连接这个api,这么写有什么问题吗,总是只有404

OkHttpClient client = new OkHttpClient();

    String messages="[{'role': 'user','content': '鲁迅和周树人的关系'},]";
    JSONObject requestBody = new JSONObject();
    requestBody.put("model", "gpt-3.5-turbo");
    requestBody.put("messages", messages);
    requestBody.put("stream", false);
    RequestBody body = RequestBody.create(MediaType.parse("application/json"), requestBody.toString());
    Request request = new Request.Builder()
            .url("https://api.chatanywhere.com.cn/v1")
            .addHeader("Authorization", "Bearer sk-Wstozi(……)kyQgyfUOxrjpDG3Y")
            .post(body)
            .build();
    Call call = client.newCall(request);
    Response response = call.execute();
    String responseBody = response.body().string();
    System.out.println(responseBody);

GPT-3.5-Turbo-16K速度较慢

测试了一下GPT-3.5-Turbo-16K,发现确实可以使用,但是目前响应速度较慢,甚至不如原来的GPT-3.5-Turbo,请问是否有可能优化?

wrong api key

after I run code in the demo , the error pop up (False, 'OpenAI API 异常: HTTP code 401 from API (wrong api key\n)'), my setting are

openai.api_key = "sk-0PfcSdT723UR44igwVxvEWvLoZJgi0FJyZWy0WCCATp5ka2a"
openai.api_base = "https://api.chatanywhere.com.cn/v1"

has anyone encounter this problem also?

chatgpt4 无效

上个问题还没解决,怎么就 close 了。 related to: #8

我去openai 官网问了一下同样的问题,结果如下:

lQLPJxm8OkiVG8bNATrNAtCwnwDsU8mMtJIEWm8fS4AMAA_720_314

我是用 poe.com 每天一次的 chatgpt4 问同样的问题:
image

这个怎么解释

Other payment options for Paid API

Good morning, Sorry to bother you, I wanted to know If you have another payment option
besides Alipay? Because I want to buy an API Key, however I don't have a passport to verify my Alipay account.

使用咨询

我想在 gpt-academic 项目中使用你的 key,请教一下怎么设置 API 转发?

GPT4忽然提示rate limit

用付费api时的GPT4时,在chatbox中出现这样的提示:
{"error":{"message":"Rate limit reached for default-gpt-4 in organization org-ATlb4GCUpG1s9F0EOR0L0xhf on tokens per min. Limit: 40000 / min. Please try again in 1ms. Contact us through our help center at help.openai.com if you continue to have issues.","type":"tokens","param":null,"code":null}}
但是我只是简单问了一个问题并未如提示所说有达到rate limit的行为。我试了下gpt3.5的模型都是可以的,请问是出现了什么问题呢?谢谢!

关于开启流式sse接收回复的消息是一整块的多行消息一起被接收。

请问下像以下的两个服务器我们客户端字节通过api调用发送请求开开启stream=true 的流式回复消息请求,是不是没效果啊?支不支持sse的回传消息呢?因为使用了以下的服务器,它开启流式sse接收回复的消息是一整块的多行消息一起一次性被接收的。没有逐行接收到sse的事件发送的数据。
Host1: https://api.chatanywhere.cn (国外服务器使用)
Host2: https://api.chatanywhere.com.cn (国内中转,延时更低,推荐)

Langchain接口报错500

apibase也改了,key也放了。测试直接用POST是可以通的。
chat = ChatOpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], temperature=1, openai_api_base=openai_endpoint, openai_api_key=”sk-xxxxxx“)

调用结果失败,貌似是被转发服务器拒绝了
[chain/error] [1:llm:ChatOpenAI] [32.17s] Chain run errored with error:
"APIError(message="HTTP code 500 from API (Request method 'POST' not supported)", http_status=500, request_id=None)"

关于中科院版chatgpt

支持了付费api后,中科院版chatgpt的又该配置?能否一并出个教程加入快速使用文档中?

免费API key用langchain.embeddings的时候出错

Retrying langchain.embeddings.openai.embed_with_retry.<locals>._embed_with_retry in 10.0 seconds as it raised APIError: HTTP code 500 from API (Request method 'POST' not supported).

请问一下免费key是不支持embeddings吗?

Host不太稳定经常连不上

转发api key对应的两个host感觉都不太稳定,尤其是在用sidebar的时候,经常用着就连不上了,或者回应速度会变得非常慢。同时,感觉转发api的速度比直连官方接口速度会慢不少。不知道是不是host访问量过大的原因?能否优化升级一下呢?谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.