Skip to content

openai_drivers_config

OpenAiDriversConfig

Bases: DriversConfig

Source code in griptape/configs/drivers/openai_drivers_config.py
@define
class OpenAiDriversConfig(DriversConfig):
    @lazy_property()
    def prompt_driver(self) -> OpenAiChatPromptDriver:
        return OpenAiChatPromptDriver(model="gpt-4o")

    @lazy_property()
    def image_generation_driver(self) -> OpenAiImageGenerationDriver:
        return OpenAiImageGenerationDriver(model="dall-e-2", image_size="512x512")

    @lazy_property()
    def image_query_driver(self) -> OpenAiImageQueryDriver:
        return OpenAiImageQueryDriver(model="gpt-4o")

    @lazy_property()
    def embedding_driver(self) -> OpenAiEmbeddingDriver:
        return OpenAiEmbeddingDriver(model="text-embedding-3-small")

    @lazy_property()
    def vector_store_driver(self) -> LocalVectorStoreDriver:
        return LocalVectorStoreDriver(embedding_driver=OpenAiEmbeddingDriver(model="text-embedding-3-small"))

    @lazy_property()
    def text_to_speech_driver(self) -> OpenAiTextToSpeechDriver:
        return OpenAiTextToSpeechDriver(model="tts-1")

    @lazy_property()
    def audio_transcription_driver(self) -> OpenAiAudioTranscriptionDriver:
        return OpenAiAudioTranscriptionDriver(model="whisper-1")

audio_transcription_driver()

Source code in griptape/configs/drivers/openai_drivers_config.py
@lazy_property()
def audio_transcription_driver(self) -> OpenAiAudioTranscriptionDriver:
    return OpenAiAudioTranscriptionDriver(model="whisper-1")

embedding_driver()

Source code in griptape/configs/drivers/openai_drivers_config.py
@lazy_property()
def embedding_driver(self) -> OpenAiEmbeddingDriver:
    return OpenAiEmbeddingDriver(model="text-embedding-3-small")

image_generation_driver()

Source code in griptape/configs/drivers/openai_drivers_config.py
@lazy_property()
def image_generation_driver(self) -> OpenAiImageGenerationDriver:
    return OpenAiImageGenerationDriver(model="dall-e-2", image_size="512x512")

image_query_driver()

Source code in griptape/configs/drivers/openai_drivers_config.py
@lazy_property()
def image_query_driver(self) -> OpenAiImageQueryDriver:
    return OpenAiImageQueryDriver(model="gpt-4o")

prompt_driver()

Source code in griptape/configs/drivers/openai_drivers_config.py
@lazy_property()
def prompt_driver(self) -> OpenAiChatPromptDriver:
    return OpenAiChatPromptDriver(model="gpt-4o")

text_to_speech_driver()

Source code in griptape/configs/drivers/openai_drivers_config.py
@lazy_property()
def text_to_speech_driver(self) -> OpenAiTextToSpeechDriver:
    return OpenAiTextToSpeechDriver(model="tts-1")

vector_store_driver()

Source code in griptape/configs/drivers/openai_drivers_config.py
@lazy_property()
def vector_store_driver(self) -> LocalVectorStoreDriver:
    return LocalVectorStoreDriver(embedding_driver=OpenAiEmbeddingDriver(model="text-embedding-3-small"))