julep-ai/julep

Simplify ChatResponse schema

Closed this issue · 0 comments

Description:

Simplify ChatResponse schema inside openapi.yaml file. It currently has a weird and confusing structure (for historical reasons) and needs to be simplified and unnested. Once that has been done, a bash script can be executed after that to automatically generate SDKs etc to follow the new schema (bash ./scripts/generate_openapi_code.sh).

However the agents-api router for the /sessions/{session_id}/chat endpoint also needs to be updated to send the new response structure correctly. The documentation will also need to be updated.

Relevant file locations:

Final expected outcome:

  • The ChatResponse schema in openapi.yaml now has a flattened structure for easier understanding and implementation
  • The /sessions/{session_id}/chat endpoint router in agents-api/agents_api/routers/sessions/routers.py has been updated to match the new ChatResponse schema
  • The script scripts/generate_openapi_code.sh has been executed to regenerate SDKs and other code artifacts according to the new ChatResponse schema