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

Run failed: ‘can only concatenate str (not “list”) to str’ when using llama-3-sqlcoder-8b model in Chatflow #11553

Closed
5 tasks done
ChenZixinn opened this issue Dec 11, 2024 · 9 comments
Labels
🐞 bug Something isn't working

Comments

@ChenZixinn
Copy link
Contributor

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.13.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When using the llama-3-sqlcoder-8b (Completion) model in Chatflow, the following error occurs:

Run failed: can only concatenate str (not "list") to str.

However, the model works correctly in Chatbot Basic.

Environment Details:

​ • Model: llama-3-sqlcoder-8b (Completion)

​ • Hosting Platform: Xorbits Inference

​ • Error Context: Chatflow usage

Screenshots:

​ 1. Chatflow Run Failure

chatflow

​ 2. Chatbot Basic Working Normally
chatbot

Steps to Reproduce:

​ 1. Install the llama-3-sqlcoder-8b model on Xorbits Inference.

​ 2. Configure it in Chatflow.

​ 3. Execute a request.

​ 4. Observe the error message.

✔️ Expected Behavior

The model should run in Chatflow without errors, just as it does in Chatbot Basic.

❌ Actual Behavior

Run fail.

Copy link

dosubot bot commented Dec 11, 2024

The error "can only concatenate str (not 'list') to str" suggests that there is an attempt to concatenate a string with a list in the Chatflow environment. This issue might be due to how the Chatflow component processes inputs or outputs differently compared to Chatbot Basic.

To resolve this, you should check the following:

  1. Data Types: Ensure that the data types being passed to the model in Chatflow are consistent with what the model expects. The Chatflow component expects specific data types such as String, Array[File], Number, Object, Array[String], Array[Number], and Array[Object] [1][2].

  2. Variable Handling: Review how variables are being handled in your Chatflow setup. There might be a variable that is expected to be a string but is being passed as a list.

  3. Concatenation Logic: Look into the part of the Chatflow code where concatenation is happening. Ensure that all concatenations involve only strings or properly convert lists to strings if needed.

By addressing these areas, you should be able to identify and fix the source of the error.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the 🐞 bug Something isn't working label Dec 11, 2024
@yihong0618
Copy link
Contributor

yihong0618 commented Dec 11, 2024

fixed in #11504
can you try the latest version?

@ChenZixinn
Copy link
Contributor Author

I tried on https://cloud.dify.ai, It's the latest version?

@crazywoola
Copy link
Member

I tried on https://cloud.dify.ai, It's the latest version?

No, this just merge yesterday. I think this is not on the Cloud.

@ChenZixinn
Copy link
Contributor Author

Thanks. It's working as expected.

@Ryuukeisyou
Copy link

Ryuukeisyou commented Dec 13, 2024

Hi, I have also encountered the same problem, "can only concatenate str (not "list") to str
", with completion models like Llama_3_2_3B_Instruct_Q8_0 and qwen2_5_7b_instruct_q8_0.

I tried updating dify to latest version using:
cd dify/docker
docker compose down
git pull origin main
docker compose pull
docker compose up -d

but the problem still exist. This is the dsl I am using. Any help would be appreciated. Thank you! @crazywoola
test_00.zip

@yihong0618
Copy link
Contributor

Hi, I have also encountered the same problem, "can only concatenate str (not "list") to str ", with completion models like Llama_3_2_3B_Instruct_Q8_0 and qwen2_5_7b_instruct_q8_0.

I tried updating dify to latest version using: cd dify/docker docker compose down git pull origin main docker compose pull docker compose up -d

but the problem still exist. This is the dsl I am using. Any help would be appreciated. Thank you! @crazywoola test_00.zip

Thanks, will check it .

@ChenZixinn
Copy link
Contributor Author

It seems like you are using Docker, and I'm not sure if it is up to date.
In my case, I rebuild the API and WORKER image in the latest version.

@yihong0618
Copy link
Contributor

Hi, I have also encountered the same problem, "can only concatenate str (not "list") to str ", with completion models like Llama_3_2_3B_Instruct_Q8_0 and qwen2_5_7b_instruct_q8_0.

I tried updating dify to latest version using: cd dify/docker docker compose down git pull origin main docker compose pull docker compose up -d

but the problem still exist. This is the dsl I am using. Any help would be appreciated. Thank you! @crazywoola test_00.zip

there's no problem in my side using your dsl please use latest code and retry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants