ice
ice copied to clipboard
Specify tracing file format/API
ICE is a great tool with a nice UI, and it would be awesome if it could integrate with popular tools like langchain. To do this we need to describe the data structure/types of the JSON file formats in trace.py
. One way to do this would be to make the Trace class inherit from the pydantic BaseModel
, and then rather than using a static file handler with FastAPI for traces you could set the response_model=List[Trace]
which would autogenerate OpenAPI docs that include the trace data structure. But it looks like there's a lot of custom code in trace.py
that I don't fully get so that may be tough.
Even just running ICE and getting an example trace, and putting it in the repo/documentation, and maybe passing it through Quicktype to generate a JSON schema from the JSON would help other people use this tool. Thanks!
Agree that this makes sense - would be happy for someone to take a stab at this!