Preview Flyte 2 for productionHosted on Union.ai

A Flyte SDK (v2) version of this plugin is available as flyteplugins-openai.

OpenAI

OpenAI

flytekitplugins-openai

FlytekitModel Servingopenaigptllmai

The plugin currently features ChatGPT and Batch API connectors.

Install
pip install flytekitplugins-openai

Quick Start(example, may need adjustment)

See full examples
pip 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)

connectorBatchEndpointConnector

Backend connector for OpenAI.

from flytekitplugins.openai import BatchEndpointConnector

taskBatchEndpointTask

Task for OpenAI.

extends PythonTask — a flyte task that can be used in workflows

from flytekitplugins.openai import BatchEndpointTask

configBatchResult

Configuration type for OpenAI.

extends dataclass — configuration or data structure for plugin setup

from flytekitplugins.openai import BatchResult

taskDownloadJSONFilesTask

Task for OpenAI.

extends PythonCustomizedContainerTask — a flyte task that can be used in workflows

from flytekitplugins.openai import DownloadJSONFilesTask

configOpenAIFileConfig

Configuration type for OpenAI.

extends dataclass — configuration or data structure for plugin setup

from flytekitplugins.openai import OpenAIFileConfig

taskUploadJSONLFileTask

Task for OpenAI.

extends PythonCustomizedContainerTask — a flyte task that can be used in workflows

from flytekitplugins.openai import UploadJSONLFileTask

taskcreate_batch

Task for OpenAI.

from flytekitplugins.openai import create_batch

connectorChatGPTConnector

Backend connector for OpenAI.

from flytekitplugins.openai import ChatGPTConnector

taskChatGPTTask

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

openai

Related Plugins

Package Info

Min Flytekit1.10.7
Modules9

Downloads

Last day9
Last week81
Last month652