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

Problems with code completion using custom openai service (koboldcpp openapi) #570

Open
unixshaman opened this issue May 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@unixshaman
Copy link

unixshaman commented May 17, 2024

What happened?

IntelliJ IDEA code completion dont work with error
image

Request to service:
[koboldcpp.autocomplete.request.txt]
(https://github.com/carlrobertoh/CodeGPT/files/15349274/koboldcpp.autocomplete.request.txt)
Response from service:
koboldcpp.autocomplete.response.txt

Relevant log output or stack trace

Stacktrace from idea:

2024-05-17 15:44:15,902 [  38035]   INFO - STDERR - [OkHttp https://ai.server.ru/...] INFO ee.carlrobert.llm.completion.CompletionEventSourceListener - Request opened.
2024-05-17 15:44:20,048 [  42181]   INFO - STDERR - [OkHttp https://ai.server.ru/...] ERROR ee.carlrobert.llm.completion.CompletionEventSourceListener - Could not serialize error response
2024-05-17 15:44:20,048 [  42181]   INFO - STDERR - java.lang.IllegalArgumentException: byteCount < 0: -1
2024-05-17 15:44:20,048 [  42181]   INFO - STDERR - 	at okio.RealBufferedSource.request(RealBufferedSource.kt:205)
2024-05-17 15:44:20,048 [  42181]   INFO - STDERR - 	at okio.RealBufferedSource.require(RealBufferedSource.kt:203)
2024-05-17 15:44:20,048 [  42181]   INFO - STDERR - 	at okio.RealBufferedSource.readFully(RealBufferedSource.kt:280)
2024-05-17 15:44:20,048 [  42181]   INFO - STDERR - 	at okhttp3.internal.sse.ServerSentEventReader$Companion.readData(ServerSentEventReader.kt:148)
2024-05-17 15:44:20,048 [  42181]   INFO - STDERR - 	at okhttp3.internal.sse.ServerSentEventReader$Companion.access$readData(ServerSentEventReader.kt:112)
2024-05-17 15:44:20,049 [  42182]   INFO - STDERR - 	at okhttp3.internal.sse.ServerSentEventReader.processNextEvent(ServerSentEventReader.kt:57)
2024-05-17 15:44:20,049 [  42182]   INFO - STDERR - 	at okhttp3.internal.sse.RealEventSource.processResponse(RealEventSource.kt:75)
2024-05-17 15:44:20,049 [  42182]   INFO - STDERR - 	at okhttp3.internal.sse.RealEventSource.onResponse(RealEventSource.kt:46)
2024-05-17 15:44:20,049 [  42182]   INFO - STDERR - 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
2024-05-17 15:44:20,049 [  42182]   INFO - STDERR - 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
2024-05-17 15:44:20,049 [  42182]   INFO - STDERR - 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
2024-05-17 15:44:20,049 [  42182]   INFO - STDERR - 	at java.base/java.lang.Thread.run(Thread.java:833)
2024-05-17 15:44:20,050 [  42183] SEVERE - #ee.carlrobert.codegpt.codecompletions.CodeCompletionEventListener - Unknown API response. Code: 200, Body: 
com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4996)
	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:109)
	at okhttp3.internal.sse.RealEventSource.processResponse(RealEventSource.kt:78)
	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:833)
2024-05-17 15:44:20,051 [  42184] SEVERE - #ee.carlrobert.codegpt.codecompletions.CodeCompletionEventListener - IntelliJ IDEA 2022.3.2  Build #IC-223.8617.56
2024-05-17 15:44:20,051 [  42184] SEVERE - #ee.carlrobert.codegpt.codecompletions.CodeCompletionEventListener - JDK: 17.0.5; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2024-05-17 15:44:20,051 [  42184] SEVERE - #ee.carlrobert.codegpt.codecompletions.CodeCompletionEventListener - OS: Windows 10
2024-05-17 15:44:20,052 [  42185] SEVERE - #ee.carlrobert.codegpt.codecompletions.CodeCompletionEventListener - Plugin to blame: CodeGPT version: 2.7.1-223

Steps to reproduce

  1. Setup CodeGPT with following settings:
    CodeGPT_CustomServiceSettings.xml.txt

  2. Press Enter anythere in the code

  3. Showing notification with fail

  4. Somethimes showing IDE Internal Error:


com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1]
	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4996)
	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:109)
	at okhttp3.internal.sse.RealEventSource.processResponse(RealEventSource.kt:78)
	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:833)

CodeGPT version

2.7.1-223

Operating System

Windows

@unixshaman unixshaman added the bug Something isn't working label May 17, 2024
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