Closed guxiyang closed 2 days ago
@guxiyang Hello there! I'm here to assist you with any bugs, questions, or contributions you might have. Let me know how I can help you today!
The issue you're experiencing with the Dify API not parsing context as expected, while the Dify console does, could be related to differences in how session history and context management are handled between the two interfaces. The Dify API uses a conversation_id
to manage session history and context. When starting a new conversation, the conversation_id
should be left empty, and the system will generate a new one. This ID must be included in subsequent API calls to maintain the conversation flow [1].
If the API is not returning the expected context, ensure that the conversation_id
is being used correctly in your API calls. Additionally, check if there are any configuration settings or parameters affecting context parsing, such as retrieval settings, weighted scores, or score thresholds, which might be influencing the API's behavior [2].
If these aspects are correctly configured and the issue persists, it might be worth investigating further into the specific implementation details or any potential discrepancies between the console and API logic.
To continue talking to Dosu, mention @dosu.
@dosu.Hello, I'm not sure if it's a problem with the dify version. I used version 0.10.1 before and I want to upgrade to version 0.10.2 to see if it works. In version 0.10.1, my chatflow workflow is set up very simply without any settings. But when calling the DIY API interface, it still says that it cannot return the history record in the prompts node. Could you please provide more detailed information "prompts":[ { "role":"system", Text ":" Character setting \ n \ nYou are ssss ", "files":[ ] }, { "role":"user", Text: "Am I sick, "files":[ ] } ],
@.***
From: dosubot[bot] Date: 2024-10-30 11:38 To: langgenius/dify CC: 顾夕D; Mention Subject: Re: [langgenius/dify] DIY API interface call, unable to parse context (Issue #10037) @guxiyang Hello there! I'm here to assist you with any bugs, questions, or contributions you might have. Let me know how I can help you today! The issue you're experiencing with the Dify API not parsing context as expected, while the Dify console does, could be related to differences in how session history and context management are handled between the two interfaces. The Dify API uses a conversation_id to manage session history and context. When starting a new conversation, the conversation_id should be left empty, and the system will generate a new one. This ID must be included in subsequent API calls to maintain the conversation flow [1]. If the API is not returning the expected context, ensure that the conversation_id is being used correctly in your API calls. Additionally, check if there are any configuration settings or parameters affecting context parsing, such as retrieval settings, weighted scores, or score thresholds, which might be influencing the API's behavior [2]. If these aspects are correctly configured and the issue persists, it might be worth investigating further into the specific implementation details or any potential discrepancies between the console and API logic. To continue talking to Dosu, mention @dosu. ― Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
I couldn't find specific information about changes between Dify versions 0.10.1 and 0.10.2, so it's unclear if upgrading will resolve your issue. However, to address the problem with the Dify API not returning session history, ensure that the conversation_id
is correctly managed. When starting a new conversation, leave the conversation_id
empty to let the system generate one, and use this ID in subsequent API calls to maintain context [1].
Additionally, check the configuration settings affecting context parsing, such as model parameters and advanced settings like memory and context variables, which can influence how the API processes session history [2]. If these are correctly set and the issue persists, it might be worth exploring any discrepancies between the console and API logic further.
To continue talking to Dosu, mention @dosu.
Okay, I'll give it a try later. First, upgrade the version to 0.10.2, and then I'll call it through the API interface. If it doesn't work, I'll need you to check if you have any contact information, such as phone or email, so we can communicate more effectively,
@.***
From: dosubot[bot] Date: 2024-10-30 12:04 To: langgenius/dify CC: 顾夕旸; Mention Subject: Re: [langgenius/dify] DIY API interface call, unable to parse context (Issue #10037) I couldn't find specific information about changes between Dify versions 0.10.1 and 0.10.2, so it's unclear if upgrading will resolve your issue. However, to address the problem with the Dify API not returning session history, ensure that the conversation_id is correctly managed. When starting a new conversation, leave the conversation_id empty to let the system generate one, and use this ID in subsequent API calls to maintain context [1]. Additionally, check the configuration settings affecting context parsing, such as model parameters and advanced settings like memory and context variables, which can influence how the API processes session history [2]. If these are correctly set and the issue persists, it might be worth exploring any discrepancies between the console and API logic further. To continue talking to Dosu, mention @dosu. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
This is a tough nut to crack, could really use your help on this, @takatost.
To continue talking to Dosu, mention @dosu.
@dosu.Hello, I'm not sure if it's a problem with the dify version. I used version 0.10.1 before and I want to upgrade to version 0.10.2 to see if it works. In version 0.10.1, my chatflow workflow is set up very simply without any settings. But when calling the DIY API interface, it still says that it cannot return the history record in the prompts node. Could you please provide more detailed information @takatost
I don't think we have this function yet.
Self Checks
Dify version
0.10.1
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
Hello, I called through the dify console and dify API interface with the same parameters. Through log queries, I found that the dify API interface call did not return any results from the node below, including session history, For example: Request parameters:
I don't know why these two returned differently. Is it a bug? I hope it can be resolved, According to our understanding, the DIY console can parse the user's context, but the DIY API interface cannot parse the context. Could you please help us take a look.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response