Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
7.13k stars 935 forks source link

Bad element url when auth activated #736

Open flagadajones opened 9 months ago

flagadajones commented 9 months ago

I've detected a bad url construction in return of useChatData() on elements property.

the url is returned like : http://localhost:8000/project/file/17cc1bd1-7218-44b9-bccd-1626928aaf4d?session_id=xxxxxxx?token=Bearer:xxxxxxxx

?token= need to be replaced by &token= a sample :

{
  "id": "7e541d3c-21b1-4b82-930b-285c311488c7",
  "threadId": "f06ad74a-65bc-4ca7-ba86-9bf84276171a",
  "type": "audio",
  "url": "http://localhost:8000/project/file/17cc1bd1-7218-44b9-bccd-1626928aaf4d?session_id=xxxxxxx?token=Bearer: xxxxxxxx",
  "chainlitKey": "17cc1bd1-7218-44b9-bccd-1626928aaf4d",
  "name": "",
  "display": "inline",
  "objectKey": null,
  "size": null,
  "page": null,
  "language": null,
  "forId": "6bffa1e1-cd3f-4888-ae4b-12d0ad7ad1e5",
  "mime": "audio/mpeg"
}
willydouhard commented 9 months ago

What version of chainlit do you use? I think we already fixed this bug