Skip to content

agetn chat error. #1204

@EnoroF

Description

@EnoroF

What happened?

kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 0: Expected start of the object '{', but had 'd' instead at path: $
JSON input: data: {"id":"chatcmpl-DPTokSFW.....
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:588)
at kotlinx.serialization.json.internal.AbstractJsonLexer.fail$default(AbstractJsonLexer.kt:586)
at kotlinx.serialization.json.internal.AbstractJsonLexer.unexpectedToken(AbstractJsonLexer.kt:790)
at kotlinx.serialization.json.internal.StringJsonLexer.consumeNextToken(StringJsonLexer.kt:74)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.beginStructure(StreamingJsonDecoder.kt:102)
at ee.carlrobert.codegpt.agent.clients.CustomOpenAIChatCompletionResponse$$serializer.deserialize(CustomOpenAIChatCompletion.kt:131)
at ee.carlrobert.codegpt.agent.clients.CustomOpenAIChatCompletionResponse$$serializer.deserialize(CustomOpenAIChatCompletion.kt:131)
at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
at kotlinx.serialization.json.Json.decodeFromString(Json.kt:149)
at ee.carlrobert.codegpt.agent.clients.CustomOpenAILLMClient.decodeResponse(CustomOpenAILLMClient.kt:687)
at ee.carlrobert.codegpt.agent.clients.CustomOpenAILLMClient.decodeResponse(CustomOpenAILLMClient.kt:65)
at ai.koog.prompt.executor.clients.openai.base.AbstractOpenAILLMClient.getResponse(AbstractOpenAILLMClient.kt:261)
at ai.koog.prompt.executor.clients.openai.base.AbstractOpenAILLMClient.access$getResponse(AbstractOpenAILLMClient.kt:81)
at ai.koog.prompt.executor.clients.openai.base.AbstractOpenAILLMClient$getResponse$1.invokeSuspend(AbstractOpenAILLMClient.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:277)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:101)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:47)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:130)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:610)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1188)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:775)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:762)

Relevant log output or stack trace

kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 0: Expected start of the object '{', but had 'd' instead at path: $
JSON input: data: {"id":"chatcmpl-DPTokSFW.....
	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
	at kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
	at kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:588)
	at kotlinx.serialization.json.internal.AbstractJsonLexer.fail$default(AbstractJsonLexer.kt:586)
	at kotlinx.serialization.json.internal.AbstractJsonLexer.unexpectedToken(AbstractJsonLexer.kt:790)
	at kotlinx.serialization.json.internal.StringJsonLexer.consumeNextToken(StringJsonLexer.kt:74)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.beginStructure(StreamingJsonDecoder.kt:102)
	at ee.carlrobert.codegpt.agent.clients.CustomOpenAIChatCompletionResponse$$serializer.deserialize(CustomOpenAIChatCompletion.kt:131)
	at ee.carlrobert.codegpt.agent.clients.CustomOpenAIChatCompletionResponse$$serializer.deserialize(CustomOpenAIChatCompletion.kt:131)
	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
	at kotlinx.serialization.json.Json.decodeFromString(Json.kt:149)
	at ee.carlrobert.codegpt.agent.clients.CustomOpenAILLMClient.decodeResponse(CustomOpenAILLMClient.kt:687)
	at ee.carlrobert.codegpt.agent.clients.CustomOpenAILLMClient.decodeResponse(CustomOpenAILLMClient.kt:65)
	at ai.koog.prompt.executor.clients.openai.base.AbstractOpenAILLMClient.getResponse(AbstractOpenAILLMClient.kt:261)
	at ai.koog.prompt.executor.clients.openai.base.AbstractOpenAILLMClient.access$getResponse(AbstractOpenAILLMClient.kt:81)
	at ai.koog.prompt.executor.clients.openai.base.AbstractOpenAILLMClient$getResponse$1.invokeSuspend(AbstractOpenAILLMClient.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
	at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:277)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:101)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:47)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
	at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:130)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:610)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:1188)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:775)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:762)

Steps to reproduce

No response

CodeGPT version

latest

Operating System

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions