A Flyte SDK (v2) version of this plugin is available as flyteplugins-openai.
OpenAI
flytekitplugins-openai
The plugin currently features ChatGPT and Batch API connectors.
pip install flytekitplugins-openaiQuick Start(example, may need adjustment)
See full examplespip install flytekitplugins-openai
from flytekit import task, workflow
from flytekitplugins.openai import BatchEndpointConnector, BatchEndpointTask, BatchResult, DownloadJSONFilesTask
@task(task_config=BatchEndpointTask(...))
def my_task() -> None:
...
@workflow
def my_workflow() -> None:
my_task()Available Imports (9)
Backend connector for OpenAI.
from flytekitplugins.openai import BatchEndpointConnector
Task for OpenAI.
extends PythonTask — a flyte task that can be used in workflows
from flytekitplugins.openai import BatchEndpointTask
Configuration type for OpenAI.
extends dataclass — configuration or data structure for plugin setup
from flytekitplugins.openai import BatchResult
Task for OpenAI.
extends PythonCustomizedContainerTask — a flyte task that can be used in workflows
from flytekitplugins.openai import DownloadJSONFilesTask
Configuration type for OpenAI.
extends dataclass — configuration or data structure for plugin setup
from flytekitplugins.openai import OpenAIFileConfig
Task for OpenAI.
extends PythonCustomizedContainerTask — a flyte task that can be used in workflows
from flytekitplugins.openai import UploadJSONLFileTask
Task for OpenAI.
from flytekitplugins.openai import create_batch
Backend connector for OpenAI.
from flytekitplugins.openai import ChatGPTConnector
This is the simplest form of a ChatGPT Task, you can define the model and the input you want.
extends PythonTask — a flyte task that can be used in workflows
from flytekitplugins.openai import ChatGPTTask
Dependencies
Related Plugins
OpenAI
This plugin provides a drop-in replacement for OpenAI packages. It provides
SGLang
Serve large language models using SGLang with Flyte Apps.
vLLM
Serve large language models using vLLM with Flyte Apps.
Dgxc-lepton
A professional Flytekit plugin that enables seamless deployment and management of AI inference endpoints using Lepton AI infrastructure within Flyte workflows.