langgenius / dify-docs

The open-source repo for docs.dify.ai
Creative Commons Attribution 4.0 International
197 stars 176 forks source link

Fix:Typo External Knowledge API Docs #319

Closed Howe829 closed 4 weeks ago

Howe829 commented 1 month ago

The external knowledge api doc have some errors. 1.it should be "retrieval_setting" not "retrival_setting" of the request body.

  1. the type of response's records should be array.
  2. the type of response's metadata should be object. Fixes #312
perzeuss commented 1 month ago

Hi @Howe829,

thanks for the contribution! The api spec still has an issue, just changing the type object to array is not enough. See https://github.com/langgenius/dify-docs/pull/320

You can test it here: https://editor.swagger.io/

Howe829 commented 1 month ago

Hi @Howe829,

thanks for the contribution! The api spec still has an issue, just changing the type object to array is not enough. See #320

You can test it here: https://editor.swagger.io/

Hi @perzeuss , I am wondering why we need to add the 'items'? I think the response structure like below is enough.

image
perzeuss commented 1 month ago

Hi @Howe829, thanks for the contribution! The api spec still has an issue, just changing the type object to array is not enough. See #320 You can test it here: https://editor.swagger.io/

Hi @perzeuss , I am wondering why we need to add the 'items'? I think the response structure like below is enough. image

What you see in the screenshot is just an example response. But the problem is that the schema is invalid, not the example. The schema must define the response type as an array whose elements are of type object.

Howe829 commented 1 month ago

Hi @Howe829, thanks for the contribution! The api spec still has an issue, just changing the type object to array is not enough. See #320 You can test it here: https://editor.swagger.io/

Hi @perzeuss , I am wondering why we need to add the 'items'? I think the response structure like below is enough. image

What you see in the screenshot is just an example response. But the problem is that the schema is invalid, not the example. The schema must define the response type as an array whose elements are of type object.

I think this pr has changed the records type to be 'array'.Could you please comment the changes if there's any problem.

AllenWriter commented 1 month ago

Hi, thanks for the suggestions! The documentation will be updated soon.

AllenWriter commented 4 weeks ago

Updated: https://docs.dify.ai/guides/knowledge-base/external-knowledge-api-documentation