coderabbit214 / bibliothecarius

Quickly build services to integrate your local data and AI models.
MIT License
458 stars 79 forks source link

在数据集里添加文档后,报400错误,请问是啥原因呢? #32

Open ahboer opened 1 year ago

ahboer commented 1 year ago

系统部署成功后,添加了一个代理,然后从代理装了部梯子才能访问api.openai.com。现在报400了,直接访问openai的那个url也是报400。换了api key还是一样。运行环境:debian10+docker+oracle jdk17+nodeJS18.15。以下为报错日志 2023-05-29T16:37:37.639+08:00 WARN 13834 --- [nio-8080-exec-5] c.b.m.c.t.support.ReflectLambdaMeta : Unable to make field private final java.lang.Class java.lang.invoke.SerializedLambda.capturingClass accessible: module java.base does not "opens java.lang.invoke" to unnamed module @19bb089b retrofit2.adapter.rxjava2.HttpException: HTTP 400 Bad Request at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57) at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38) at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48) at io.reactivex.Observable.subscribe(Observable.java:10151) at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35) at io.reactivex.Observable.subscribe(Observable.java:10151) at io.reactivex.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:35) at io.reactivex.Single.subscribe(Single.java:2517) at io.reactivex.Single.blockingGet(Single.java:2001) at com.coderabbit214.bibliothecarius.openai.OpenAiService.execute(OpenAiService.java:83) at com.coderabbit214.bibliothecarius.openai.OpenAiService.sentEmbeddings(OpenAiService.java:70) at com.coderabbit214.bibliothecarius.vector.openai.OpenAiVectorService.getVector(OpenAiVectorService.java:64) at com.coderabbit214.bibliothecarius.document.DocumentService.toVector(DocumentService.java:194) at com.coderabbit214.bibliothecarius.document.DocumentService.toQdrant(DocumentService.java:166) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) retrofit2.adapter.rxjava2.HttpException: HTTP 400 Bad Request at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57) at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38) at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48) at io.reactivex.Observable.subscribe(Observable.java:10151) at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35) at io.reactivex.Observable.subscribe(Observable.java:10151) at io.reactivex.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:35) at io.reactivex.Single.subscribe(Single.java:2517) at io.reactivex.Single.blockingGet(Single.java:2001) at com.coderabbit214.bibliothecarius.openai.OpenAiService.execute(OpenAiService.java:83) at com.coderabbit214.bibliothecarius.openai.OpenAiService.sentEmbeddings(OpenAiService.java:70) at com.coderabbit214.bibliothecarius.vector.openai.OpenAiVectorService.getVector(OpenAiVectorService.java:64) at com.coderabbit214.bibliothecarius.document.DocumentService.toVector(DocumentService.java:194) at com.coderabbit214.bibliothecarius.document.DocumentService.toQdrant(DocumentService.java:166) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) retrofit2.adapter.rxjava2.HttpException: HTTP 400 Bad Request at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57) at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38) at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48) at io.reactivex.Observable.subscribe(Observable.java:10151) at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35) at io.reactivex.Observable.subscribe(Observable.java:10151) at io.reactivex.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:35) at io.reactivex.Single.subscribe(Single.java:2517) at io.reactivex.Single.blockingGet(Single.java:2001) at com.coderabbit214.bibliothecarius.openai.OpenAiService.execute(OpenAiService.java:83) at com.coderabbit214.bibliothecarius.openai.OpenAiService.sentEmbeddings(OpenAiService.java:70) at com.coderabbit214.bibliothecarius.vector.openai.OpenAiVectorService.getVector(OpenAiVectorService.java:64) at com.coderabbit214.bibliothecarius.document.DocumentService.toVector(DocumentService.java:194) at com.coderabbit214.bibliothecarius.document.DocumentService.toQdrant(DocumentService.java:166) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) 2023-05-29T16:37:45.343+08:00 ERROR 13834 --- [ task-1] c.c.b.document.DocumentService : txt file converted to qdrant exception

java.lang.RuntimeException: OpenAiService sentEmbeddings failed at com.coderabbit214.bibliothecarius.openai.OpenAiService.sentEmbeddings(OpenAiService.java:75) ~[classes!/:0.0.1-SNAPSHOT] at com.coderabbit214.bibliothecarius.vector.openai.OpenAiVectorService.getVector(OpenAiVectorService.java:64) ~[classes!/:0.0.1-SNAPSHOT] at com.coderabbit214.bibliothecarius.document.DocumentService.toVector(DocumentService.java:194) ~[classes!/:0.0.1-SNAPSHOT] at com.coderabbit214.bibliothecarius.document.DocumentService.toQdrant(DocumentService.java:166) ~[classes!/:0.0.1-SNAPSHOT] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) ~[spring-aop-6.0.6.jar!/:6.0.6] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) ~[spring-aop-6.0.6.jar!/:6.0.6] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-6.0.6.jar!/:6.0.6] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-6.0.6.jar!/:6.0.6] at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) ~[spring-aop-6.0.6.jar!/:6.0.6] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na] at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]