dify icon indicating copy to clipboard operation
dify copied to clipboard

Update segments via api

Open jos-bek opened this issue 7 months ago • 2 comments

Self Checks

  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit report (我已阅读并同意 Language Policy).
  • [X] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Provide a description of requested docs changes

Hi, I'm currently trying to update segments via the API. I have noticed a few things that do not quite match the documentation described. The request body described is not quite correct:

<Property name='segment' type='object list' key='segment'> It should be: <Property name='segment' type='object' key='segment'>

I also noticed that if keywords is not defined in the request body, the segment is disabled and the error keywords is set to the segment object. Keywords are described as optional in the documentation. I would also expect the API to return an Error if it is required.

Enabling and disabling segments also does not behave as expected. I thought I could simply set enabled to true or false. Unfortunately, sometimes it has no effect and I can't really understand why.

jos-bek avatar Jul 12 '24 16:07 jos-bek