Skip to content

Commit

Permalink
Merge pull request #195 from griptape-ai:fix/custom_openAI
Browse files Browse the repository at this point in the history
Fix/custom_openAI
  • Loading branch information
shhlife authored Dec 20, 2024
2 parents 489fb91 + c14de58 commit 6c09160
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 72 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ You can previous and download more examples [here](examples/README.md).

## Recent Changelog

### Dec 21, 2024
* Fixed issue where Griptape Agent Config: Custom Structure node was still requiring OPENAI_API_KEY.
* Updated to Griptape v1.0.2

### Dec 12, 2024
* Updated to Griptape Framework 1.0!
* Added check for BlackForest install issues to not block Griptape Nodes running
Expand Down
4 changes: 2 additions & 2 deletions js/versions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const versions = {
version: "2.0.0",
releaseDate: "2024-11-9",
version: "2.0.3",
releaseDate: "2024-12-21",
name: "ComfyUI-Griptape",
description: "Griptape integration for ComfyUI",
author: "Jason Schleifer",
Expand Down
40 changes: 5 additions & 35 deletions nodes/config/gtUIStructureConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,22 @@
DummyImageGenerationDriver,
DummyPromptDriver,
DummyTextToSpeechDriver,
OpenAiAudioTranscriptionDriver,
OpenAiChatPromptDriver,
OpenAiEmbeddingDriver,
OpenAiImageGenerationDriver,
OpenAiTextToSpeechDriver,
)

from ...py.griptape_settings import GriptapeSettings
from ..gtUIBase import gtUIBase

default_env = "OPENAI_API_KEY"


class gtUIStructureConfig(gtUIBase):
"""
Griptape Structure Config
"""

def __init__(self):
# Check for the default OPENAI_API_KEY being set
settings = GriptapeSettings()
has_openai_key = settings.get_settings_key_or_use_env(default_env) is not None
if not has_openai_key:
self.default_chat_prompt_driver = DummyPromptDriver()
self.default_image_generation_driver = DummyImageGenerationDriver()
self.default_embedding_driver = DummyEmbeddingDriver()
self.default_text_to_speech_driver = DummyTextToSpeechDriver()
self.default_audio_transcription_driver = DummyAudioTranscriptionDriver()
else:
self.default_chat_prompt_driver = OpenAiChatPromptDriver(model="gpt-4o")
self.default_image_generation_driver = OpenAiImageGenerationDriver(
model="dall-e-3"
)
self.default_chat_prompt_driver = OpenAiChatPromptDriver(model="gpt-4o")
self.default_image_generation_driver = OpenAiImageGenerationDriver(
model="dall-e-3"
)
self.default_embedding_driver = OpenAiEmbeddingDriver()
self.default_text_to_speech_driver = OpenAiTextToSpeechDriver(
model="tts-1", voice="alloy"
)
self.default_audio_transcription_driver = OpenAiAudioTranscriptionDriver(
model="whisper-1"
)

pass
self.default_chat_prompt_driver = DummyPromptDriver()
self.default_image_generation_driver = DummyImageGenerationDriver()
self.default_embedding_driver = DummyEmbeddingDriver()
self.default_text_to_speech_driver = DummyTextToSpeechDriver()
self.default_audio_transcription_driver = DummyAudioTranscriptionDriver()

@classmethod
def INPUT_TYPES(s):
Expand Down
31 changes: 0 additions & 31 deletions pyproject-dev.toml

This file was deleted.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
python-dotenv = "^1.0.1"
griptape = { version = "^1.0.0", extras = ["all"]}
griptape = { version = "^1.0.2", extras = ["all"]}
griptape-black-forest = {git = "https://github.com/griptape-ai/griptape-black-forest.git"}

[tool.poetry.group.dev.dependencies]
Expand All @@ -27,9 +27,9 @@ priority = "explicit"
[project]
name = "comfyui-griptape"
description = "Griptape LLM(Large Language Model) Nodes for ComfyUI."
version = "2.0.2"
version = "2.0.3"
license = {file = "LICENSE"}
dependencies = ["griptape[all]==^1.0.0", "python-dotenv", "poetry==1.8.4", "griptape-black-forest @ git+https://github.com/griptape-ai/griptape-black-forest.git"]
dependencies = ["griptape[all]==^1.0.2", "python-dotenv", "poetry==1.8.4", "griptape-black-forest @ git+https://github.com/griptape-ai/griptape-black-forest.git"]

[project.urls]
Repository = "https://github.com/griptape-ai/ComfyUI-Griptape"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
griptape[all]==1.0.0
griptape[all]==1.0.2
python-dotenv
poetry==1.8.4
git+https://github.com/griptape-ai/griptape-black-forest.git

0 comments on commit 6c09160

Please sign in to comment.