janhq/cortex.cpp

epic: Cortex Local Swagger should not have deprecated API endpoints

Closed this issue · 4 comments

Goal

Swagger should have updated OpenAI API compatible endpoints

Task list

  • remove outdated API endpoints eg /inferences,/fine_tuning
  • Clean up duplicate endpoints.
    • eg chat completion has inferences/server/chat_completion VS v1/chat/completions (should be this as it is OpenAI compatible)
  • Add supported /v1 endpoints #1456
  • We should be using the Scalar Swagger template: https://cortex.so/api-reference

Resources

Image

We are having deprecated and duplicate API endpoints. We will clean it soon.
We should only have below API endpoints (still updating..)

/v1/chat/completions
/v1/embeddings
/v1/engines/install/{1}
/v1/engines/{1}
/v1/engines
/v1/engines/{1}
/v1/models/pull
/v1/models
/v1/models/{1}
/v1/models/import
/v1/models/alias
/v1/models/start
/v1/models/stop

@gabrielle-ong , currently, the most up to date version of openapi is https://github.com/janhq/cortex.cpp/blob/dev/docs/static/openapi/jan.json

It's also being used in https://cortex.so/api-reference

Hi James

  • Can we change the openapi/jan.json to cortex.json
  • Can we use use the Scalar UI instead of Swagger UI? like we do on the website (https://cortex.so/api-reference/)
    Image

@gabrielle-ong , I update to use scalar instead of swagger. However, about changing openapi/jan.json to cortex.json, please contact devops since I think it will affect cortex.so.
I suggest keep it name for now.