elsa-workflows / elsa-workflows/elsa-extensions

Add OpenAI Integration

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
49
Forks
48
Avg merge
21h 35m
Merged PRs (30d)
20

Description

This issue tracks the implementation of an integration for **OpenAI (DALL-E & ChatGPT)** in Elsa Workflows. The module should allow workflows to interact with OpenAI services, including text generation, image creation, transcription, translation, and batch processing.

## **Tasks**
- [ ] Create a new module: `Elsa.Integrations.OpenAI`
- [ ] Implement **Workflow Activities**:
- [ ] **AddFilesToVectorStore** - Adds files to a specified vector store or creates a new one based on configuration.
- [ ] **AnalyzeImagesVision** - Analyzes images according to specified instructions.
- [ ] **CancelBatch** - Cancels an "in-progress" batch, which will transition to "cancelled" after up to 10 minutes.
- [ ] **CreateBatch** - Creates and executes a batch of API calls.
- [ ] **CreateCompletion** - Generates a completion for a given prompt using GPT models.
- [ ] **CreateModeration** - Determines whether an image or text contains violent, hateful, illicit, or adult content.
- [ ] **CreateTranscription** - Converts an audio file to text using Whisper.
- [ ] **CreateTranslation** - Translates an audio file into English using Whisper.
- [ ] **EditImage** - Edits or extends an image using DALL-E.
- [ ] **GenerateAudio** - Produces an audio file based on text input and settings.
- [ ] **GenerateImage** - Creates an image using DALL-E.
- [ ] **GetBatch** - Retrieves details of a specified batch.
- [ ] **ListBatches** - Retrieves a list of batches.
- [ ] **MakeAPICall** - Performs an arbitrary authorized API call to OpenAI services.
- [ ] **MessageAssistant** - Sends messages to a specified or newly created thread and executes it seamlessly with Assistants v2.
- [ ] **TransformTextToStructuredData** - Extracts structured data from a prompt’s text.
- [ ] **UploadFile** - Uploads a file for use across the OpenAI platform.
- [ ] **WatchBatchCompleted** - Triggers when a batch process is completed.

- [ ] Add Unit Tests
- [ ] Add Documentation (`README.md`)

## **References**
- 📖 [OpenAI API Docs](https://platform.openai.com/docs/)
- 🛠️ [OpenAI SDKs](https://platform.openai.com/docs/libraries)

## **Notes**
- This should follow the standard structure used for Elsa Integrations.
- The integration should support authentication via API keys.

## **Contributor Guidelines**
If you're interested in working on this issue:

1. Comment below to claim it.
2. Follow the [CONTRIBUTING.md](https://github.com/elsa-workflows/elsa-integrations/blob/main/CONTRIBUTING.md) guide.
3. Submit a PR referencing this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.