You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`"C:\Program Files\Java\jdk1.8.0_261\bin\java.exe" "-javaagent:D:\soft\IntelliJ IDEA 2023.1.2\lib\idea_rt.jar=60061:D:\soft\IntelliJ IDEA 2023.1.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\SKX010330\AppData\Local\Temp\classpath646542043.jar com.d.yunt.llms.AiChatTest
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/apache-maven-3.6.3/repository/ch/qos/logback/logback-classic/1.2.12/logback-classic-1.2.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/apache-maven-3.6.3/repository/org/slf4j/slf4j-simple/1.7.36/slf4j-simple-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: --> POST http://172.17.12.72:11434/api/chat
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: Content-Type: application/json; charset=utf-8
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: Content-Length: 645
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: --> END POST
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: <-- HTTP FAILED: com.d.yunt.llms.exception.CommonException: {"error":"illegal base64 data at input byte 5"}
Exception in thread "main" java.lang.RuntimeException: com.d.yunt.llms.exception.CommonException: {"error":"illegal base64 data at input byte 5"}
at com.d.yunt.llms.AiChatTest.main(AiChatTest.java:54)
Caused by: com.d.yunt.llms.exception.CommonException: {"error":"illegal base64 data at input byte 5"}
at com.d.yunt.llms.exception.chain.impl.OpenAiErrorHandler.parseError(OpenAiErrorHandler.java:33)
at com.d.yunt.llms.exception.chain.ErrorHandler.process(ErrorHandler.java:51)
at com.d.yunt.llms.interceptor.ErrorInterceptor.intercept(ErrorInterceptor.java:48)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at com.d.yunt.llms.platform.ollama.chat.OllamaAiChatService.chatCompletion(OllamaAiChatService.java:269)
at com.d.yunt.llms.platform.ollama.chat.OllamaAiChatService.chatCompletion(OllamaAiChatService.java:332)
at com.d.yunt.llms.AiChatTest.imageChat(AiChatTest.java:73)
at com.d.yunt.llms.AiChatTest.main(AiChatTest.java:52)
Process finished with exit code 1
`
The text was updated successfully, but these errors were encountered:
public static void main(String[] args) { init(); String question = "最近3天北京的天气怎么样?火车是否允许发车?"; //目前Ollama部署了3个模型:qwen2.5:7b/llama3:8b/llama3.2:3b //向量模型:mxbai-embed-large/nomic-embed-text String model="qwen2.5:7b"; String function = "queryWeather"; String function2 = "queryTrainInfo"; String imageUrl="https://cn.bing.com/images/search?view=detailV2&ccid=r0OnuYkv&id=9A07DE578F6ED50DB59DFEA5C675AC71845A6FC9&thid=OIP.r0OnuYkvsbqBrYk3kUT53AHaKX&mediaurl=https%3a%2f%2fimg.zcool.cn%2fcommunity%2f0104c15cd45b49a80121416816f1ec.jpg%401280w_1l_2o_100sh.jpg&exph=1792&expw=1280&q=%e5%b0%8f%e7%8c%ab%e5%9b%be%e7%89%87&simid=607987191780608963&FORM=IRPRST&ck=12127C1696CF374CB9D0F09AE99AFE69&selectedIndex=2&itb=0&qpvt=%e5%b0%8f%e7%8c%ab%e5%9b%be%e7%89%87"; // 发送对话请求 try { //ResponseBodyEmitter emitter = chatStream(question,model); //chat(question,model); //functionChat(question,model,function,function2); imageChat(question,model,imageUrl); } catch (Exception e) { throw new RuntimeException(e); } }
`"C:\Program Files\Java\jdk1.8.0_261\bin\java.exe" "-javaagent:D:\soft\IntelliJ IDEA 2023.1.2\lib\idea_rt.jar=60061:D:\soft\IntelliJ IDEA 2023.1.2\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\SKX010330\AppData\Local\Temp\classpath646542043.jar com.d.yunt.llms.AiChatTest
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/apache-maven-3.6.3/repository/ch/qos/logback/logback-classic/1.2.12/logback-classic-1.2.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/apache-maven-3.6.3/repository/org/slf4j/slf4j-simple/1.7.36/slf4j-simple-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: --> POST http://172.17.12.72:11434/api/chat
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: Content-Type: application/json; charset=utf-8
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: Content-Length: 645
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: --> END POST
十一月 15, 2024 3:11:21 下午 okhttp3.internal.platform.Platform log
信息: <-- HTTP FAILED: com.d.yunt.llms.exception.CommonException: {"error":"illegal base64 data at input byte 5"}
Exception in thread "main" java.lang.RuntimeException: com.d.yunt.llms.exception.CommonException: {"error":"illegal base64 data at input byte 5"}
at com.d.yunt.llms.AiChatTest.main(AiChatTest.java:54)
Caused by: com.d.yunt.llms.exception.CommonException: {"error":"illegal base64 data at input byte 5"}
at com.d.yunt.llms.exception.chain.impl.OpenAiErrorHandler.parseError(OpenAiErrorHandler.java:33)
at com.d.yunt.llms.exception.chain.ErrorHandler.process(ErrorHandler.java:51)
at com.d.yunt.llms.interceptor.ErrorInterceptor.intercept(ErrorInterceptor.java:48)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
at com.d.yunt.llms.platform.ollama.chat.OllamaAiChatService.chatCompletion(OllamaAiChatService.java:269)
at com.d.yunt.llms.platform.ollama.chat.OllamaAiChatService.chatCompletion(OllamaAiChatService.java:332)
at com.d.yunt.llms.AiChatTest.imageChat(AiChatTest.java:73)
at com.d.yunt.llms.AiChatTest.main(AiChatTest.java:52)
Process finished with exit code 1
`
The text was updated successfully, but these errors were encountered: