Skip to content

[Bug]: API query retrieval error #6412

@MurderWind

Description

@MurderWind

Self Checks

  • 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).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

None

RAGFlow image version

v0.17.2

Other environment information

Actual behavior

when i use api for querying retrieval . it returns errors; stack error:
"message": "UnboundLocalError("local variable 'role' referenced before assignment")"

Image

Expected behavior

No response

Steps to reproduce

curl --request POST \
  --url http://{{host}}/api/v1/retrieval \
  --header 'Accept: */*' \
  --header 'Accept-Encoding: gzip, deflate, br' \
  --header 'Authorization: Bearer {{API_KEY}}' \
  --header 'Connection: keep-alive' \
  --header 'Content-Type: application/json' \
  --header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
  --data '

 {
          "question": "What is advantage of ragflow?",
          "kb_id":["cc8bfcf4062211f09f04e27b2ae033f3"],
          "dataset_ids": ["cc8bfcf4062211f09f04e27b2ae033f3"],
          "document_ids": ["9dda8896062511f0a0dce27b2ae033f3"]
     }'

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working, pull request that fix bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions