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

json error during skill usage #238

Open
Canterlotdayo opened this issue Jun 11, 2023 · 1 comment
Open

json error during skill usage #238

Canterlotdayo opened this issue Jun 11, 2023 · 1 comment

Comments

@Canterlotdayo
Copy link

From time to time, this error occurs when using a skill (e.g. weather).

Error occured in processing request: Unexpected character encountered while parsing value: 何. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue () [0x002ac] in /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:1817 at Newtonsoft.Json.JsonTextReader.Read () [0x0004c] in /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:429 at Newtonsoft.Json.JsonReader.ReadAndMoveToContent () [0x00000] in /root/repo/Src/Newtonsoft.Json/JsonReader.cs:1240 at Newtonsoft.Json.JsonReader.ReadForType (Newtonsoft.Json.Serialization.JsonContract contract, System.Boolean hasConverter) [0x0004a] in /root/repo/Src/Newtonsoft.Json/JsonReader.cs:1197 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000db] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:202 at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00046] in /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:904 at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:883 at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:831 at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:787 at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value) [0x00000] in /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:720 at ChatdollKit.Examples.ChatGPT.ChatGPTEmotionSkill.UpdateResponse (ChatdollKit.Dialog.Response response, System.String chatGPTResponseText) [0x00006] in C:\Users\Florian\assistant\Assets\ChatdollKit\Examples\ChatGPT\ChatGPTEmotionSkill.cs:21 at ChatdollKit.Examples.ChatGPT.ChatGPTSkill.ProcessAsync (ChatdollKit.Dialog.Request request, ChatdollKit.Dialog.Processor.State state, ChatdollKit.Dialog.Processor.User user, System.Threading.CancellationToken token) [0x00270] in C:\Users\Florian\assistant\Assets\ChatdollKit\Examples\ChatGPT\ChatGPTSkill.cs:128 at Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask2[TStateMachine,T].GetResult (System.Int16 token) [0x00000] in C:\Users\Florian\assistant\Assets\Plugins\UniTask\Runtime\CompilerServices\StateMachineRunner.cs:342
at ChatdollKit.Dialog.Processor.LocalRequestProcessor.ProcessRequestAsync (ChatdollKit.Dialog.Request request, System.Threading.CancellationToken token) [0x005e8] in C:\Users\Florian\assistant\Assets\ChatdollKit\Scripts\Dialog\Processor\LocalRequestProcessor.cs:122
UnityEngine.Debug:LogError (object)
ChatdollKit.Dialog.Processor.LocalRequestProcessor/d__21:MoveNext () (at Assets/ChatdollKit/Scripts/Dialog/Processor/LocalRequestProcessor.cs:165)
Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask2<ChatdollKit.Dialog.Processor.LocalRequestProcessor/<ProcessRequestAsync>d__21, ChatdollKit.Dialog.Response>:Run () (at Assets/Plugins/UniTask/Runtime/CompilerServices/StateMachineRunner.cs:313)

@uezo
Copy link
Owner

uezo commented Jun 11, 2023

Maybe the response from ChatGPT is not JSON.
I recommend ChatGPTStreamSkill instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants