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
50.35k stars 7.22k forks source link

Zhipu API call error #7682

Closed V4me1 closed 2 months ago

V4me1 commented 2 months ago

Self Checks

Dify version

https://cloud.dify.ai/

Cloud or Self Hosted

Cloud

Steps to reproduce

image The official template with zhipu API will produce this error. I contacted Zhipu, they said it's a suscessful api call in their record. I can use outdated ChatGLM_turbo api just fine.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 2 months ago

@V4me1 Hello there! I'm a bot designed to help you with bug reports, answer questions, and assist you in becoming a contributor. I'm here to help you while you wait for a human maintainer.

I found two similar discussions that might be relevant to your issue:

  1. core.model_runtime.errors.invoke.InvokeError: [huggingface_tei] Error: timed out - This discussion is still open and was last updated on August 21, 2024 [1].
  2. Bug: The issue with calling Zhipu AI is that in the chat assistant type, workflow orchestration is available, but errors occur when using the workflow type - This discussion is also open and was last updated on April 18, 2024 [2].

The "IDENTIFY TERMS" node in your workflow diagram fails with a RetryError due to an APIRequestFailedError when using the Zhipu API, even though Zhipu records it as a successful API call. This error is likely raised by the Dify platform's error handling mechanism, which could be triggered by network problems, timeouts, or unexpected response formats, even if the Zhipu API logs the call as successful [3][4].

The APIRequestFailedError is raised when there is an issue with the status of the HTTP response received from the API. It captures the HTTP response and its status code, indicating that the request failed due to an unexpected status code [4].

There are timeout settings and retry policies configured for the Zhipu API calls in the Dify platform. The HttpClient class includes parameters for timeout and max_retries, with default values set to 300 seconds for timeout and 3 retries [5][6][4].

The expected response format from the Zhipu API is:

{
    "result": "pong"
}

This response is expected when the API Endpoint receives a request with point=ping. The Dify platform validates this response to ensure the API's availability and correctness [7][8][9].

If you need further assistance, please provide more details about the error or any additional logs.

To continue talking to Dosu, mention @dosu.

crazywoola commented 2 months ago

We display this error because we received an error response, maybe it's a rate limit issue, what's your current rate limit of this model?

I tested it alone, it seems works for me.

V4me1 commented 2 months ago

image

crazywoola commented 2 months ago

Then I guess it's the rate limit error. Although they have processed your request, but it returns some rate limit error.

V4me1 commented 2 months ago

I tried the Article Grading Bot with zhipu api, and it worked. It's strange. Maybe the workflow has different api requesting machenism from chatbot template

lyx102 commented 2 months ago

有没有可能是你关闭了记忆功能?