Calling the /v1/chat-messages interface prompts an Internal Server Error, please contact support. #7404

Closed
opened 2026-02-21 18:20:26 -05:00 by yindo · 4 comments
Owner

Originally created by @ouguofeng on GitHub (Dec 26, 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.13.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Using the same application configuration, the application calls the api with an error. I have read the docker log and it is indicated like this. May I ask why this is?

error:
2024-12-26 07:17:28.024 ERROR [Thread-4557 (_generate_worker)] [app_generator.py:232] - Unknown Error when generating
Traceback (most recent call last):
File "/app/api/core/app/apps/chat/app_generator.py", line 212, in _generate_worker
runner.run(
File "/app/api/core/app/apps/chat/app_runner.py", line 159, in run
context = dataset_retrieval.retrieve(

File "/app/api/core/rag/retrieval/dataset_retrieval.py", line 136, in retrieve
all_documents = self.multiple_retrieve(

File "/app/api/core/rag/retrieval/dataset_retrieval.py", line 418, in multiple_retrieve
data_post_processor = DataPostProcessor(tenant_id, reranking_mode, reranking_model, weights, False)

File "/app/api/core/rag/data_post_processor/data_post_processor.py", line 25, in init
self.rerank_runner = self._get_rerank_runner(reranking_mode, tenant_id, reranking_model, weights)

File "/app/api/core/rag/data_post_processor/data_post_processor.py", line 68, in _get_rerank_runner
rerank_model_instance = self._get_rerank_model_instance(tenant_id, reranking_model)

File "/app/api/core/rag/data_post_processor/data_post_processor.py", line 88, in _get_rerank_model_instance
provider=reranking_model["reranking_provider_name"],

KeyError: 'reranking_provider_name'
2024-12-26 07:17:28.031 ERROR [Dummy-4558] [base_app_generate_response_converter.py:133] - 'reranking_provider_name'
Uploading 4837d37a622d7ff060d16e005cae8fb.png…

✔️ Expected Behavior

I hope to solve this problem

Actual Behavior

No response

Originally created by @ouguofeng on GitHub (Dec 26, 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.13.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Using the same application configuration, the application calls the api with an error. I have read the docker log and it is indicated like this. May I ask why this is? error: 2024-12-26 07:17:28.024 ERROR [Thread-4557 (_generate_worker)] [app_generator.py:232] - Unknown Error when generating Traceback (most recent call last): File "/app/api/core/app/apps/chat/app_generator.py", line 212, in _generate_worker runner.run( File "/app/api/core/app/apps/chat/app_runner.py", line 159, in run context = dataset_retrieval.retrieve( File "/app/api/core/rag/retrieval/dataset_retrieval.py", line 136, in retrieve all_documents = self.multiple_retrieve( File "/app/api/core/rag/retrieval/dataset_retrieval.py", line 418, in multiple_retrieve data_post_processor = DataPostProcessor(tenant_id, reranking_mode, reranking_model, weights, False) File "/app/api/core/rag/data_post_processor/data_post_processor.py", line 25, in __init__ self.rerank_runner = self._get_rerank_runner(reranking_mode, tenant_id, reranking_model, weights) File "/app/api/core/rag/data_post_processor/data_post_processor.py", line 68, in _get_rerank_runner rerank_model_instance = self._get_rerank_model_instance(tenant_id, reranking_model) File "/app/api/core/rag/data_post_processor/data_post_processor.py", line 88, in _get_rerank_model_instance provider=reranking_model["reranking_provider_name"], KeyError: 'reranking_provider_name' 2024-12-26 07:17:28.031 ERROR [Dummy-4558] [base_app_generate_response_converter.py:133] - 'reranking_provider_name' ![Uploading 4837d37a622d7ff060d16e005cae8fb.png…]() ### ✔️ Expected Behavior I hope to solve this problem ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:20:26 -05:00
yindo closed this issue 2026-02-21 18:20:26 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 26, 2024):

The error you're encountering is due to a missing 'reranking_provider_name' key in the reranking model configuration. This key is essential for identifying the provider of the reranking model, and its absence leads to a KeyError when the system attempts to access it [1].

To resolve this issue, you should ensure that the 'reranking_provider_name' is correctly specified in your configuration. Here are a few steps you can take:

  1. Check Configuration: Verify that your reranking model configuration includes the 'reranking_provider_name' key. This should be part of the configuration dictionary passed to the DataPostProcessor.

  2. Default Values: If you are using default configurations, ensure that the default reranking model is correctly set up with a provider name. The system should fall back to default values if specific configurations are not provided [2].

  3. Review Setup: If you have a setup or configuration file where these values are defined, double-check that all necessary keys are present and correctly spelled.

By ensuring that the 'reranking_provider_name' is included in your configuration, you should be able to avoid this error and proceed with the API call successfully.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Dec 26, 2024): <!-- Answer --> The error you're encountering is due to a missing 'reranking_provider_name' key in the reranking model configuration. This key is essential for identifying the provider of the reranking model, and its absence leads to a `KeyError` when the system attempts to access it <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/rag/data_post_processor/data_post_processor.py)</sup>. To resolve this issue, you should ensure that the 'reranking_provider_name' is correctly specified in your configuration. Here are a few steps you can take: 1. **Check Configuration**: Verify that your reranking model configuration includes the 'reranking_provider_name' key. This should be part of the configuration dictionary passed to the `DataPostProcessor`. 2. **Default Values**: If you are using default configurations, ensure that the default reranking model is correctly set up with a provider name. The system should fall back to default values if specific configurations are not provided <sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx)</sup>. 3. **Review Setup**: If you have a setup or configuration file where these values are defined, double-check that all necessary keys are present and correctly spelled. By ensuring that the 'reranking_provider_name' is included in your configuration, you should be able to avoid this error and proceed with the API call successfully. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/81989d6e-8d30-4ef1-a0a7-da1fab4c85b3?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/81989d6e-8d30-4ef1-a0a7-da1fab4c85b3?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/81989d6e-8d30-4ef1-a0a7-da1fab4c85b3?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/81989d6e-8d30-4ef1-a0a7-da1fab4c85b3?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/81989d6e-8d30-4ef1-a0a7-da1fab4c85b3?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/81989d6e-8d30-4ef1-a0a7-da1fab4c85b3?feedback_type=other)</sup>
Author
Owner

@yihong0618 commented on GitHub (Dec 26, 2024):

the screen shot is broken

@yihong0618 commented on GitHub (Dec 26, 2024): the screen shot is broken
Author
Owner

@ouguofeng commented on GitHub (Dec 26, 2024):

Uploading 4837d37a622d7ff060d16e005cae8fb.png…

@ouguofeng commented on GitHub (Dec 26, 2024): ![Uploading 4837d37a622d7ff060d16e005cae8fb.png…]()
Author
Owner

@yihong0618 commented on GitHub (Dec 26, 2024):

still

@yihong0618 commented on GitHub (Dec 26, 2024): still
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7404