langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
46.08k stars 6.5k forks source link

Dify APIServer: Not applying SDK defaults from location #8563

Open Enchante503 opened 2 days ago

Enchante503 commented 2 days ago

Self Checks

Dify version

dify-web@0.8.2

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

sagemaker.config INFO - Not applying SDK defaults from location: /etc/xdg/sagemaker/config.yaml sagemaker.config INFO - Not applying SDK defaults from location: /home/uer/.config/sagemaker/config.yaml WARNING [MainThread] [ext_mail.py:51] - MAIL_TYPE is not set When I launch DifyAPIServer, I get a warning message. How can I solve this?

✔️ Expected Behavior

Dify APIServer starts normally

❌ Actual Behavior

When I launch DifyAPIServer, I get a warning message.

dosubot[bot] commented 2 days ago

The warning messages you're encountering are related to the sagemaker.config file and the MAIL_TYPE setting.

  1. sagemaker.config Warnings:

    • The messages indicate that the SDK defaults are not being applied from the specified locations (/etc/xdg/sagemaker/config.yaml and /home/user/.config/sagemaker/config.yaml). Unfortunately, there is no specific information available in the repository about the role of the sagemaker.config file or why these defaults might not be applying.
  2. MAIL_TYPE Warning:

    • The MAIL_TYPE setting specifies the type of mail service to be used for sending emails. It can be set to either resend or smtp. You need to configure this setting in your environment variables to avoid the warning.

Here are the configurations for each MAIL_TYPE:

Ensure you set the MAIL_TYPE and its corresponding configurations in your environment variables to resolve the warning [1][2].

For the sagemaker.config issue, you might need to check if the configuration files exist at the specified locations and if they contain the correct settings. If the problem persists, further investigation into the specific usage of sagemaker.config within the DifyAPIServer codebase might be necessary.

To continue talking to Dosu, mention @dosu.

Enchante503 commented 2 days ago

Hello Thank you for your reply. The solution to the sagemaker issue can be found at the following URL.https://stackoverflow.com/questions/77119831/sagemaker-sdk-on-lambda-function

or pip install sagemaker==2.182.0

kurokobo commented 2 days ago

As stated in the logs, the message about sagemaker is just INFO instead of WARNING. You can safely ignore that.

sagemaker.config 👉INFO👈 - Not applying SDK defaults from location: /etc/xdg/sagemaker/config.yaml
sagemaker.config 👉INFO👈 - Not applying SDK defaults from location: /home/uer/.config/sagemaker/config.yaml
WARNING [MainThread] [ext_mail.py:51] - MAIL_TYPE is not set

The only WARNING you can see is for MAIL_TYPE, this is completely different from sagemaker-thing. If you want to suppress this, please ensure that you have MAIL_TYPE env configured: https://github.com/langgenius/dify/blob/0.8.2/docker/.env.example#L523