chatgpt-java icon indicating copy to clipboard operation
chatgpt-java copied to clipboard

ChatGPT Java SDK支持流式输出、Gpt插件、联网。支持OpenAI官方所有接口。ChatGPT的Java客户端。OpenAI GPT-3.5-Turb GPT-4 Api Client for Java

Results 93 chatgpt-java issues
Sort by recently updated
recently updated
newest added

Caused by: java.io.IOException: unexpected end of stream on unknown java.io.EOFException: \n not found: limit=0 content=…

Exception in thread "main" java.lang.ExceptionInInitializerError at com.ChatGPT.main(ChatGPT.java:16) Caused by: org.apache.logging.log4j.LoggingException: log4j-slf4j-impl cannot be present with log4j-to-slf4j at org.apache.logging.slf4j.Log4jLoggerFactory.validateContext(Log4jLoggerFactory.java:49) at org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:39) at org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:30) at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:53) at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)...

引入okHttp 3.8.1版本中的HttpUrl.get方法参数为get(URL url),但是在Retrofit中调用HttpUrl.get(String url),会报NoSuchMethodError: okhttp3.HttpUrl.get(Ljava/lang/String;)Lokhttp3/HttpUrl; 手动引入okHttp3.12.0之后,不再报错 但是使用流展示的实例时,又会遇到新的版本冲突问题,具体原因没有找到,貌似是因为okHttp-see这个包的版本有问题

sse方式支持同一KEY,多个人同时提问吗?

为什么用了梯子能通过浏览器访问chatgpt接口,然而使用hutools发送请求超时(访问国内的网站能够响应得到数据) ![800_LI (2)](https://user-images.githubusercontent.com/104897103/223739634-33324713-845d-4042-9f4b-bda1b451cda4.jpg) ![userAvater](https://user-images.githubusercontent.com/104897103/223739687-2acf35be-8b2f-4fee-95ab-9407f0e2e823.jpg)

`try { val client = buildClient() val eventSourceListener = ChatEventSourceListener(chat, Model.CHATGPT_3_5_TURBO) val message = Message.builder().role(Message.Role.USER).content(text).build() val chatCompletion = ChatCompletion.builder().messages(listOf(message)).build() client!!.streamChatCompletion(chatCompletion, eventSourceListener) val countDownLatch = CountDownLatch(1) try { countDownLatch.await() } catch...

![image](https://user-images.githubusercontent.com/104607562/223671978-2189cf0d-0da1-460f-be30-ea1a168b78a2.png) ![image](https://user-images.githubusercontent.com/104607562/223672062-415a008c-2d22-4be1-a7ae-e86459ea37ff.png)