uploaded 3 months ago
OpenAI library compatible with ESP-IDF

readme

[![Component Registry](https://components.espressif.com/components/espressif/openai/badge.svg)](https://components.espressif.com/components/espressif/openai)

## Open AI component

The `openai` component is a porting version of [OpenAI-ESP32](https://github.com/me-no-dev/OpenAI-ESP32) arduino library, which simplifies the process of invoking the OpenAI API on `ESP-IDF`. This library provides extensive support for the majority of OpenAI API functionalities, except for `files` and `fine-tunes`. For more details, please refer to [OpenAI](https://platform.openai.com/docs/api-reference) API REFERENCE.

### Open AI User Guide

Please refer: https://docs.espressif.com/projects/esp-iot-solution/en/latest/ai/openai.html

### Add component to your project

Please use the component manager command `add-dependency` to add the `openai` to your project's dependency, during the `CMake` step the component will be downloaded automatically

```
idf.py add-dependency "espressif/openai=*"
```

### How To Use

1. You need to register an OpenAI key.
2. Pass the key into the initialization function of the component:
    ```
    OpenAI_t *openai = OpenAICreate(openai_key);
    ```
3. Connect to a WiFi network that has access to the OpenAI servers.

changelog

# ChangeLog

## v0.3.1 - 2023-12-29

### Enhancements

* Fix infinite loop of TTS read
* Update Error message

## v0.3.0 - 2023-12-4

### Enhancements

* Support OpenAI text to speech api

## v0.2.0 - 2023-11-15

### Enhancements

* Support config the OpenAI Base URL through API `OpenAIChangeBaseURL` or `menuconfig`. Thanks [@Sam McLeod](https://github.com/sammcj)
* Using MP3 format audio file in unit test

## v0.1.2 - 2023-8-4

### Docs

* Update OpenAI.h for build online docs

## v0.1.1 - 2023-6-29

### Enhancements

* Support http chunked transfer.

## v0.1.0 - 2023-6-14

### Enhancements

* Init version

Links

Supports all targets

License: Apache-2.0

To add this component to your project, run:

idf.py add-dependency "espressif/openai^0.3.1"

or download archive

Dependencies

  • espressif/cmake_utilities 0.*
  • ESP-IDF >=4.4.0
  • Stats

    • Downloaded in total
      Downloaded in total 1.9k times
    • Downloaded this version
      This version: 500 times

    Badge

    espressif/openai version: 0.3.1
    |