Show ChatGPT internal steps to user
Opened this issue · 0 comments
When a prompt is sent by the user, ChatGPT performs a number of steps to resolve that query:
- Recursively calls Wikipedia to figure out getting a datetime range and location for your question
- Calls other functions available to it to get bbox / datetime
- Formulates the query parameters that it uses to send to STAC
We should make all these steps transparent to the user - it's useful to know how the result got processed and be able to debug when you get unexpected results.
Currently, these "Observations" and "Thoughts" are logged in the python code roughly like: https://github.com/developmentseed/labs-gpt-stac/blob/main/main.py#L132
We should compile all this data into the JSON we send down to the client, alongwith the STAC feature collection, so the frontend can show the steps followed to get the answer, including Wikipedia links, etc.
Stretch goal: have all this happen over a Websocket so the user can see the steps happening as they are performed.
cc @geohacker