Extracting parameters when memory is enabled does not work #5024

Closed
opened 2026-02-21 18:09:03 -05:00 by yindo · 10 comments
Owner

Originally created by @dailydaniel on GitHub (Aug 13, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.12

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. create any chatflow
  2. add extraction parameters block
  3. turn on memory in extraction parametres

✔️ Expected Behavior

extraction parameters

Actual Behavior

success: 0 and random reason every time

Originally created by @dailydaniel on GitHub (Aug 13, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.12 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. create any chatflow 2. add extraction parameters block 3. turn on memory in extraction parametres ### ✔️ Expected Behavior extraction parameters ### ❌ Actual Behavior success: 0 and random reason every time
yindo added the 🐞 bug label 2026-02-21 18:09:03 -05:00
yindo closed this issue 2026-02-21 18:09:03 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 13, 2024):

To resolve the issue of receiving a "success: 0" message and a random reason when extracting parameters with memory enabled in Dify version 0.6.12 on a self-hosted Docker setup, follow these steps:

  1. Check Docker Containers: Ensure all required Docker containers are running successfully:

    docker compose ps
    
  2. Update Environment Variables: Sync your .env file with the latest configuration from .env.example:

    cd dify/docker
    cp .env.example .env
    
  3. Restart Dify: Apply the changes by restarting the Dify services:

    docker compose down
    docker compose up -d
    
  4. Check Logs: If the issue persists, check the logs of the relevant containers to identify any specific errors. For example, to check the logs of the api container:

    docker compose logs api
    
  5. Cross-Domain Issues: Ensure CORS configurations are correctly set. Update the following configuration items in docker-compose.yml to the new domain:

    • CONSOLE_API_URL
    • CONSOLE_WEB_URL
    • SERVICE_API_URL
    • APP_API_URL
    • APP_WEB_URL
  6. Port Configuration: Ensure ports are correctly configured and not conflicting with other services. If port 80 is occupied, stop the service occupying port 80 or modify the port mapping in docker-compose.yaml to map port 80 to another port.

By following these steps, you should be able to resolve the issue with parameter extraction in Dify [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 13, 2024): <!-- Answer --> To resolve the issue of receiving a "success: 0" message and a random reason when extracting parameters with memory enabled in Dify version 0.6.12 on a self-hosted Docker setup, follow these steps: 1. **Check Docker Containers**: Ensure all required Docker containers are running successfully: ```bash docker compose ps ``` 2. **Update Environment Variables**: Sync your `.env` file with the latest configuration from `.env.example`: ```bash cd dify/docker cp .env.example .env ``` 3. **Restart Dify**: Apply the changes by restarting the Dify services: ```bash docker compose down docker compose up -d ``` 4. **Check Logs**: If the issue persists, check the logs of the relevant containers to identify any specific errors. For example, to check the logs of the `api` container: ```bash docker compose logs api ``` 5. **Cross-Domain Issues**: Ensure CORS configurations are correctly set. Update the following configuration items in `docker-compose.yml` to the new domain: - `CONSOLE_API_URL` - `CONSOLE_WEB_URL` - `SERVICE_API_URL` - `APP_API_URL` - `APP_WEB_URL` 6. **Port Configuration**: Ensure ports are correctly configured and not conflicting with other services. If port 80 is occupied, stop the service occupying port 80 or modify the port mapping in `docker-compose.yaml` to map port 80 to another port. By following these steps, you should be able to resolve the issue with parameter extraction in Dify <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/docker-compose.md)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/learn-more/faq/self-host-faq.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Aug 13, 2024):

Can you give us more details regarding this issue? An example would be great, for instance, a input content and expected content.

@crazywoola commented on GitHub (Aug 13, 2024): Can you give us more details regarding this issue? An example would be great, for instance, a input content and expected content.
Author
Owner

@dailydaniel commented on GitHub (Aug 13, 2024):

@crazywoola yml of chatflow demo, in this chatflow parameter extraction memory is on and it does not work (success 0), if you turn off memory it will work with success 1. I also tested it with different LLMs, like qwen 7b and openchat 7b.

app:
description: ''
icon: "\U0001F916"
icon_background: '#FFEAD5'
mode: advanced-chat
name: issue demo
workflow:
features:
file_upload:
image:
enabled: false
number_limits: 3
transfer_methods:
- local_file
- remote_url
opening_statement: ''
retriever_resource:
enabled: true
sensitive_word_avoidance:
enabled: false
speech_to_text:
enabled: false
suggested_questions: []
suggested_questions_after_answer:
enabled: false
text_to_speech:
enabled: false
language: ''
voice: ''
graph:
edges:
- data:
sourceType: llm
targetType: answer
id: llm-answer
source: llm
sourceHandle: source
target: answer
targetHandle: target
type: custom
- data:
isInIteration: false
sourceType: start
targetType: parameter-extractor
id: 1723558713101-source-1723558759503-target
source: '1723558713101'
sourceHandle: source
target: '1723558759503'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
sourceType: parameter-extractor
targetType: llm
id: 1723558759503-source-llm-target
source: '1723558759503'
sourceHandle: source
target: llm
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1723558713101'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
memory:
role_prefix:
assistant: ''
user: ''
window:
enabled: false
size: 10
model:
completion_params:
temperature: 0.3
mode: chat
name: MultiCreator Lite
provider: corpgpt
prompt_template:
- id: 131ec626-9b8c-42a5-afd6-6f1714652286
role: system
text: you should give brief answers.
selected: false
title: LLM
type: llm
variables: []
vision:
enabled: false
height: 98
id: llm
position:
x: 680
y: 282
positionAbsolute:
x: 680
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#llm.text#}}'
desc: ''
selected: false
title: Answer
type: answer
variables: []
height: 107
id: answer
position:
x: 980
y: 282
positionAbsolute:
x: 980
y: 282
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
instruction: ''
memory:
query_prompt_template: ''
role_prefix:
assistant: ''
user: ''
window:
enabled: false
size: 50
model:
completion_params:
temperature: 0
mode: chat
name: MultiCreator Lite
provider: corpgpt
parameters:
- description: sentiment of last message
name: message_sentiment
required: true
type: string
- description: give sentiment of last 5 messages
name: dialogue_sentiment
required: true
type: string
query:
- sys
- query
reasoning_mode: prompt
selected: false
title: Parameter Extractor
type: parameter-extractor
variables: []
height: 98
id: '1723558759503'
position:
x: 380
y: 282
positionAbsolute:
x: 380
y: 282
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -729
y: 34.5
zoom: 1

image
@dailydaniel commented on GitHub (Aug 13, 2024): @crazywoola yml of chatflow demo, in this chatflow parameter extraction memory is on and it does not work (success 0), if you turn off memory it will work with success 1. I also tested it with different LLMs, like qwen 7b and openchat 7b. app: description: '' icon: "\U0001F916" icon_background: '#FFEAD5' mode: advanced-chat name: issue demo workflow: features: file_upload: image: enabled: false number_limits: 3 transfer_methods: - local_file - remote_url opening_statement: '' retriever_resource: enabled: true sensitive_word_avoidance: enabled: false speech_to_text: enabled: false suggested_questions: [] suggested_questions_after_answer: enabled: false text_to_speech: enabled: false language: '' voice: '' graph: edges: - data: sourceType: llm targetType: answer id: llm-answer source: llm sourceHandle: source target: answer targetHandle: target type: custom - data: isInIteration: false sourceType: start targetType: parameter-extractor id: 1723558713101-source-1723558759503-target source: '1723558713101' sourceHandle: source target: '1723558759503' targetHandle: target type: custom zIndex: 0 - data: isInIteration: false sourceType: parameter-extractor targetType: llm id: 1723558759503-source-llm-target source: '1723558759503' sourceHandle: source target: llm targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: Start type: start variables: [] height: 54 id: '1723558713101' position: x: 80 y: 282 positionAbsolute: x: 80 y: 282 sourcePosition: right targetPosition: left type: custom width: 244 - data: context: enabled: false variable_selector: [] desc: '' memory: role_prefix: assistant: '' user: '' window: enabled: false size: 10 model: completion_params: temperature: 0.3 mode: chat name: MultiCreator Lite provider: corpgpt prompt_template: - id: 131ec626-9b8c-42a5-afd6-6f1714652286 role: system text: you should give brief answers. selected: false title: LLM type: llm variables: [] vision: enabled: false height: 98 id: llm position: x: 680 y: 282 positionAbsolute: x: 680 y: 282 selected: false sourcePosition: right targetPosition: left type: custom width: 244 - data: answer: '{{#llm.text#}}' desc: '' selected: false title: Answer type: answer variables: [] height: 107 id: answer position: x: 980 y: 282 positionAbsolute: x: 980 y: 282 sourcePosition: right targetPosition: left type: custom width: 244 - data: desc: '' instruction: '' memory: query_prompt_template: '' role_prefix: assistant: '' user: '' window: enabled: false size: 50 model: completion_params: temperature: 0 mode: chat name: MultiCreator Lite provider: corpgpt parameters: - description: sentiment of last message name: message_sentiment required: true type: string - description: give sentiment of last 5 messages name: dialogue_sentiment required: true type: string query: - sys - query reasoning_mode: prompt selected: false title: Parameter Extractor type: parameter-extractor variables: [] height: 98 id: '1723558759503' position: x: 380 y: 282 positionAbsolute: x: 380 y: 282 selected: true sourcePosition: right targetPosition: left type: custom width: 244 viewport: x: -729 y: 34.5 zoom: 1 <img width="744" alt="image" src="https://github.com/user-attachments/assets/5a73add7-b90b-4169-8ad5-038ef6d6f3aa">
Author
Owner

@crazywoola commented on GitHub (Aug 13, 2024):

Hello I guess this yml is not useable, because it lost it's formatting, you could zip it and upload it again.

@crazywoola commented on GitHub (Aug 13, 2024): Hello I guess this yml is not useable, because it lost it's formatting, you could zip it and upload it again.
Author
Owner

@dailydaniel commented on GitHub (Aug 13, 2024):

@crazywoola sorry)
issue demo.yml.zip

@dailydaniel commented on GitHub (Aug 13, 2024): @crazywoola sorry) [issue demo.yml.zip](https://github.com/user-attachments/files/16601323/issue.demo.yml.zip)
Author
Owner

@crazywoola commented on GitHub (Aug 14, 2024):

Hello, I tried your yml file, but I am not sure about what to input.

Failed to extract result.from function call or text response,using empty result.

I have revisited the issue, from the error above, it seems qwen 7b and openchat 7b do not support function calling, maybe it's related to this setting.

image
@crazywoola commented on GitHub (Aug 14, 2024): Hello, I tried your yml file, but I am not sure about what to input. > Failed to extract result.from function call or text response,using empty result. I have revisited the issue, from the error above, it seems `qwen 7b` and `openchat 7b` do not support function calling, maybe it's related to this setting. <img width="633" alt="image" src="https://github.com/user-attachments/assets/32f62ad3-160c-4b6e-9838-1bfc9f6b0971">
Author
Owner

@dailydaniel commented on GitHub (Aug 21, 2024):

Sorry for long reply @crazywoola
I've tested it on gpt3.5 and the result is same so I don't really think that problem is in open source 7b models.
image

@dailydaniel commented on GitHub (Aug 21, 2024): Sorry for long reply @crazywoola I've tested it on gpt3.5 and the result is same so I don't really think that problem is in open source 7b models. <img width="800" alt="image" src="https://github.com/user-attachments/assets/54c29d07-5949-4509-9fb3-40601e4118a7">
Author
Owner

@dailydaniel commented on GitHub (Aug 21, 2024):

It works when i change reasoning mode to func call, but it's still strange that it doesn't work for any model in prompt reasoning when memory is turned on.

@dailydaniel commented on GitHub (Aug 21, 2024): It works when i change reasoning mode to func call, but it's still strange that it doesn't work for any model in prompt reasoning when memory is turned on.
Author
Owner

@linfey90 commented on GitHub (Sep 23, 2024):

It works when i change reasoning mode to func call, but it's still strange that it doesn't work for any model in prompt reasoning when memory is turned on.

Hi, may I ask if this issue has been resolved? I have also encountered the same problem where my memory is not working.

@linfey90 commented on GitHub (Sep 23, 2024): > It works when i change reasoning mode to func call, but it's still strange that it doesn't work for any model in prompt reasoning when memory is turned on. Hi, may I ask if this issue has been resolved? I have also encountered the same problem where my memory is not working.
Author
Owner

@mkaskov commented on GitHub (Nov 11, 2024):

I have the same problem. its not fixed

@mkaskov commented on GitHub (Nov 11, 2024): I have the same problem. its not fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5024