Skip to content
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

Custom OpenAI Error #664

Open
JackCmd233 opened this issue Aug 16, 2024 · 1 comment
Open

Custom OpenAI Error #664

JackCmd233 opened this issue Aug 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JackCmd233
Copy link

What happened?

As long as I write the code, the plug-in will report an error, whether AI is used or not.

For example, if I enter a carriage return line feed in the code, it will report an error.

Relevant log output or stack trace

Unknown API response. Code: 422, Body: Failed to deserialize the JSON body into the target type: missing field `messages` at line 6 column 1

Unknown API response. Code: 422, Body: Failed to deserialize the JSON body into the target type: missing field `messages` at line 6 column 1

com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Failed': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 7]
	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2567)
	at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2593)
	at com.fasterxml.jackson.core.JsonParser._constructReadException(JsonParser.java:2601)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:765)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:3018)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:2052)
	at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:780)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4992)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4898)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3848)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3816)
	at ee.carlrobert.llm.client.openai.completion.OpenAITextCompletionEventSourceListener.getErrorDetails(OpenAITextCompletionEventSourceListener.java:43)
	at ee.carlrobert.llm.completion.CompletionEventSourceListener.onFailure(CompletionEventSourceListener.java:112)
	at okhttp3.internal.sse.RealEventSource.processResponse(RealEventSource.kt:52)
	at okhttp3.internal.sse.RealEventSource.onResponse(RealEventSource.kt:46)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
	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:840)

Steps to reproduce

  1. I am using deepseek AI model, it is compatible with OpenAI, so there should be no compatibility issues
  2. If I switch from Custom OpenAI to OpenAI or any other model, there is no error.

CodeGPT version

2.9.0.233

Operating System

Windows

@JackCmd233 JackCmd233 added the bug Something isn't working label Aug 16, 2024
@JackCmd233
Copy link
Author

I may have found the key to the problem
close this option
Error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant