cheshire-cat-ai/core

[Feature]Add API Client for C++/C/Arduino

Opened this issue ยท 5 comments

The issue:

It seems that the project already has clients to contact the cat, but they are all high-level and interpreted as python, javascript etc. The much more energy-constrained platforms of microcontrollers such as arduino, esp32 do not have the privilege of running on expensive and heavy platforms such as python vm, so it would be optimal for the entire edge computing landscape to be able to use a lightweight client dedicated to microboards.

The solution

Adding an official client for arduino/esp32 board

The alternative

Implement a websocket and api handler to handle only the main /admin page through Arduino libraries.
A very crude solution and limited to chatting using the raw JSON format

The JSON format

My Request
Schermata del 2024-06-10 16-18-33

My Response
Schermata del 2024-06-10 16-18-22

Thank you for your time and best wishes for the project.

Hi @LorenzoSiena thanks for the suggestion.
If you feel like it, you can create the C++ / Arduino client on your profile and open source it, and we can mention it into the docs in the Clients section

Up to you if you want to then donate the repo to the org (and still be the maintainer of it) or just keep it somewhere else.
We just care about it being open :)

Also as a note, in the next weeks we will be adding the possibility of accessing the endpoints via JWT other than api_key.

Thanks!!

@LorenzoSiena I suggest you to check out these resources:

  • OpenAPI Schema

@LorenzoSiena I suggest you to check out these resources:

* [OpenAPI Generator](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#overview)

* [OpenAPI Schema](https://github.com/cheshire-cat-ai/api-client-ts/blob/main/catapi.json)

About the schema, i found multiple version of it , from my istance on docker on serverip:port/openapi.json and maybe another on this repo ,so, are all the same or i should use the "last version available"?

@LorenzoSiena I suggested you that specific version of the schema because is the only version that has types specified in it. Actually the CCat is not fully typed so I manually created that schema to match the correct DTOs.

I will start working on it in the next few days and in case i will update you with the repository.