Hello, does anyone know how to handle this? [ValleyTalk] Failed to connect to the model. [15:23:55 ERR] '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0. [ValleyTalk] Unable to get model names or generate dialogue. Please check the API Key is correctly entered.
"Dialogue is essentially the creation of a story. To enhance immersion, is it possible for AI to determine what kind of background music should be played based on the content of the current dialogue? For example, if the conversation becomes emotional or sad, the game could automatically switch to a more melancholic BGM. And since the game already has small animated character sprites for dancing, could certain topics trigger characters to perform animations like 'dancing' or 'laughing out loud' as a reaction?"
Could you please set a maximum wait time (for example, 5 seconds) for when the AI does not follow the return format instructions (such as not using the correct line prefixes or responding too long)? If the time exceeds this limit, the mod should give up on receiving that line and present the default content instead. Otherwise, every time we encounter '[ValleyTalk] Error generating AI response for Harvey: System.Exception: No valid results returned from AI. AI returned "".', the game will pause for nearly 20 seconds.
Hi, I'm getting an error when using the ValleyTalk mod. It happens during gameplay and shows a self-referencing loop issue related to DialogueLine. Here is the full error message: [game] An error occurred in the base update loop: Newtonsoft.Json.JsonSerializationException: Self referencing loop detected with type 'StardewValley.DialogueLine'. Path 'OverheardHistory[0].Item2.dialogues[2].SideEffects.Target.CS$<>8__locals1.<>4__this.dialogues'. at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer) at StardewModdingAPI.Framework.ModHelpers.DataHelper.WriteSaveData[TModel](String key, TModel model) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/ModHelpers/DataHelper.cs:line 102 at ValleyTalk.DialogueBuilder.AddOverheardLine(NPC otherNpc, NPC instance, List`1 theLine) in /home/david/VSCode/ValleyTalk/DialogueBuilder.cs:line 294 at ValleyTalk.NPC_CurrentDialogue_Patch.Postfix(NPC& __instance, Stack`1& __result) in /home/david/VSCode/ValleyTalk/PatchNpc.cs:line 104 at StardewValley.NPC.get_CurrentDialogue_PatchedBy<dandm1.ValleyTalk>(NPC this) It seems the mod is trying to save a DialogueLine object that contains a circular reference, which causes a crash in JSON serialization.Could you please fix this or add a workaround like using ReferenceLoopHandling.Ignore in the serialization settings?Thank you very much for your work! I really enjoy the mod otherwise.
I have tried, but the instructions available for how to make a mod compatible with Android are quite limited. I have not given up, but it's going to be a bit of an experiment from here.
So how long do you think it will take to become mobile compatible?
If it is compatible with mobile, what will be the differences with PC, like some features not being usable or being restricted?
The reason I'm really interested in this mod and the reason I'm asking about mobile is, I saw this mod before starting after installing everything on mobile (I know the game from beginning to end) and now when it's compatible with mobile, I'll download everything again and start. I wish you success in making this mod, take care, have a nice day.
hi, I encountered some problems when using this mod [ValleyTalk] Error loading event history for Mister Qi from save file. System.ArgumentException: The data key is invalid (keys must only contain letters, numbers, underscores, periods, or hyphens). (Parameter 'key') at StardewModdingAPI.Framework.ModHelpers.DataHelper.GetSaveFileKey(String key) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/ModHelpers/DataHelper.cs:line 147 at StardewModdingAPI.Framework.ModHelpers.DataHelper.ReadSaveData[TModel](String key) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/ModHelpers/DataHelper.cs:line 79 at StardewDialogue.EventHistoryReader.LoadFromSaveFile(String name) in /home/david/VSCode/ValleyTalk/EventHistoryReader.cs:line 52
I found that after I turned off Trinket and Button's Extra Trigger Action Stuff (BETAS), the NPC dialogue returned to normal. But now there is a new problem. When sensitive content is submitted to the AI, the AI may not be willing to generate the content. This will cause the API to have no return content and the NPC's dialog box to pause for a very long time (perhaps more than 10 seconds), and only respond to the three dots "...". Is there a quick identification mechanism to determine whether the AI has responded? If there is no response or involved content, let the Mod quickly respond with other preset texts instead of pausing for so long.
450 comments
[ValleyTalk] Failed to connect to the model.
[15:23:55 ERR] '<' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.
[ValleyTalk] Unable to get model names or generate dialogue. Please check the API Key is correctly entered.
To enhance immersion, is it possible for AI to determine what kind of background music should be played based on the content of the current dialogue?
For example, if the conversation becomes emotional or sad, the game could automatically switch to a more melancholic BGM.
And since the game already has small animated character sprites for dancing, could certain topics trigger characters to perform animations like 'dancing' or 'laughing out loud' as a reaction?"
[ValleyTalk] Failed to connect to the model.[ValleyTalk] API key is not provided. Please check the configuration.
I followed the instruction provided to install with Mistral but I can't seem to make work !
I need help! lol
[game] An error occurred in the base update loop: Newtonsoft.Json.JsonSerializationException: Self referencing loop detected with type 'StardewValley.DialogueLine'. Path 'OverheardHistory[0].Item2.dialogues[2].SideEffects.Target.CS$<>8__locals1.<>4__this.dialogues'. at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer) at StardewModdingAPI.Framework.ModHelpers.DataHelper.WriteSaveData[TModel](String key, TModel model) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/ModHelpers/DataHelper.cs:line 102 at ValleyTalk.DialogueBuilder.AddOverheardLine(NPC otherNpc, NPC instance, List`1 theLine) in /home/david/VSCode/ValleyTalk/DialogueBuilder.cs:line 294 at ValleyTalk.NPC_CurrentDialogue_Patch.Postfix(NPC& __instance, Stack`1& __result) in /home/david/VSCode/ValleyTalk/PatchNpc.cs:line 104 at StardewValley.NPC.get_CurrentDialogue_PatchedBy<dandm1.ValleyTalk>(NPC this)
It seems the mod is trying to save a DialogueLine object that contains a circular reference, which causes a crash in JSON serialization.Could you please fix this or add a workaround like using ReferenceLoopHandling.Ignore in the serialization settings?Thank you very much for your work! I really enjoy the mod otherwise.
So how long do you think it will take to become mobile compatible?
If it is compatible with mobile, what will be the differences with PC, like some features not being usable or being restricted?
The reason I'm really interested in this mod and the reason I'm asking about mobile is, I saw this mod before starting after installing everything on mobile (I know the game from beginning to end) and now when it's compatible with mobile, I'll download everything again and start. I wish you success in making this mod, take care, have a nice day.
[ValleyTalk] Error loading event history for Mister Qi from save file. System.ArgumentException: The data key is invalid (keys must only contain letters, numbers, underscores, periods, or hyphens). (Parameter 'key') at StardewModdingAPI.Framework.ModHelpers.DataHelper.GetSaveFileKey(String key) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/ModHelpers/DataHelper.cs:line 147 at StardewModdingAPI.Framework.ModHelpers.DataHelper.ReadSaveData[TModel](String key) in /home/pathoschild/git/SMAPI/src/SMAPI/Framework/ModHelpers/DataHelper.cs:line 79 at StardewDialogue.EventHistoryReader.LoadFromSaveFile(String name) in /home/david/VSCode/ValleyTalk/EventHistoryReader.cs:line 52
But now there is a new problem. When sensitive content is submitted to the AI, the AI may not be willing to generate the content. This will cause the API to have no return content and the NPC's dialog box to pause for a very long time (perhaps more than 10 seconds), and only respond to the three dots "...". Is there a quick identification mechanism to determine whether the AI has responded? If there is no response or involved content, let the Mod quickly respond with other preset texts instead of pausing for so long.