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

I can not save the LLM's config (e.g. MAX_TOKEN) in workflow after publish 【v0.6.3】 #3536

Open
4 tasks done
sapipoZZZ opened this issue Apr 17, 2024 · 13 comments
Open
4 tasks done
Assignees
Labels
🐞 bug Something isn't working 🤔 cant-reproduce This issue can not be reproduced 🌊 feat:workflow Workflow related stuff.

Comments

@sapipoZZZ
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I can not save the LLM's config (e.g. MAX_TOKEN) in workflow after publish 【v0.6.3】

✔️ Expected Behavior

fix bug

❌ Actual Behavior

No response

Copy link

dosubot bot commented Apr 17, 2024

To address the issue of not being able to save the LLM's MAX_TOKEN configuration in Dify version 0.6.3, it's important to first ensure that the configuration changes are being made correctly within the system. The process involves navigating to Settings > Model Providers > OpenLLM in your Dify setup and entering the model details, including the MAX_TOKEN setting. After entering these details, clicking "Save" should apply the configuration.

The MAX_TOKEN setting is defined within the Dify configuration as follows, allowing a range from 1 to 8192:

  - name: max_tokens
    use_template: max_tokens
    default: 2048
    min: 1
    max: 8192

If you're encountering issues saving this setting, it could be related to changes in how Dify handles JSON and XML response formats in version 0.6.3. These changes might affect configuration saving if your setup relies on specific output formats for processing or storage.

Unfortunately, without a specific error message or more detailed description of the behavior you're experiencing, it's challenging to provide a precise solution. Could you provide more details about the error you encounter when attempting to save the MAX_TOKEN setting? This information will be crucial for identifying the root cause and guiding you towards a resolution.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added 🌊 feat:workflow Workflow related stuff. 🐞 bug Something isn't working labels Apr 17, 2024
@crazywoola
Copy link
Member

Please provide more information regarding this issue? Which LLM do you use for that node. A screenshot is perferred.

@sapipoZZZ
Copy link
Author

Please provide more information regarding this issue? Which LLM do you use for that node. A screenshot is perferred.
Whether using GPT-4 or Qwen1.5, the setting for max tokens will be lost.

image
image

@upseem
Copy link

upseem commented Apr 17, 2024

The default max-token of command-r is 128k, but the display is 4096. I modified - api/core/model_runtime/model_providers/cohere/llm/command-r.yaml and mapped it to docker. Dify can operate, but messages cannot be sent. Report an error.

WX20240417-115224
max-token
WX20240417-115121
WX20240417-115224

@upseem
Copy link

upseem commented Apr 17, 2024

WX20240417-115151

@Yeuoly
Copy link
Collaborator

Yeuoly commented Apr 17, 2024

WX20240417-115151

Max tokens is different from context_size, the first one take care of "at most how many tokens the model could output", and the second one means "how many tokens the model could accept as messages", the max_tokens is actually 4000, that's why you got this error.

@Yeuoly
Copy link
Collaborator

Yeuoly commented Apr 17, 2024

Please provide more information regarding this issue? Which LLM do you use for that node. A screenshot is perferred.
Whether using GPT-4 or Qwen1.5, the setting for max tokens will be lost.

image image

I just cannot reproduce this issue, configs were saved correctly, are there any more detailed steps?
image

@upseem
Copy link

upseem commented Apr 17, 2024

Gpt-4 turbo is a 128k context, and it is the same situation. I can only set it to 4096. This is restricted by Dify or OpenAI.
gpt-4-turbo
@Yeuoly Please help me answer it, thank you very much.

@crazywoola
Copy link
Member

WX20240417-115151

Max tokens is different from context_size, the first one take care of "at most how many tokens the model could output", and the second one means "how many tokens the model could accept as messages", the max_tokens is actually 4000, that's why you got this error.

@upseem Already answered

@crazywoola crazywoola added the 🤔 cant-reproduce This issue can not be reproduced label Apr 17, 2024
@sapipoZZZ
Copy link
Author

Please provide more information regarding this issue? Which LLM do you use for that node. A screenshot is perferred.
Whether using GPT-4 or Qwen1.5, the setting for max tokens will be lost.

In my workflow, I have 3 LLM nodes,
you can try:
step1: LLM1-->model--->change MAX_TOKENS
step2: publish--> update
step3: click LLM2's model, and switch to LLM1. LLM1's model setting will be lost

@crazywoola
Copy link
Member

Please provide more information regarding this issue? Which LLM do you use for that node. A screenshot is perferred.
Whether using GPT-4 or Qwen1.5, the setting for max tokens will be lost.

In my workflow, I have 3 LLM nodes, you can try: step1: LLM1-->model--->change MAX_TOKENS step2: publish--> update step3: click LLM2's model, and switch to LLM1. LLM1's model setting will be lost

Step 2

image

Step 3
image

Cant repro

@sapipoZZZ
Copy link
Author

@crazywoola I have recorded a video for you. It seems to always restore to the default LLM setting.

2024-04-18.09-20-34.mp4

@tangxqa
Copy link

tangxqa commented Apr 19, 2024

@crazywoola I have recorded a video for you. It seems to always restore to the default LLM setting.

2024-04-18.09-20-34.mp4

I encountered the same problem today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🤔 cant-reproduce This issue can not be reproduced 🌊 feat:workflow Workflow related stuff.
Projects
None yet
Development

No branches or pull requests

6 participants