Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LorenzoSiena opened this issue Jun 10, 2024 · 5 comments
Open

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

LorenzoSiena opened this issue Jun 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@LorenzoSiena
Copy link

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.

@LorenzoSiena LorenzoSiena added the enhancement New feature or request label Jun 10, 2024
@pieroit
Copy link
Member

pieroit commented Jun 10, 2024

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!!

@zAlweNy26
Copy link
Member

@LorenzoSiena I suggest you to check out these resources:

@LorenzoSiena
Copy link
Author

  • 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"?

@zAlweNy26
Copy link
Member

@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.

@LorenzoSiena
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants