Skip to content

Commit

Permalink
Merge pull request #149 from griptape-ai:dev
Browse files Browse the repository at this point in the history
fix base agent to have correct api key
  • Loading branch information
shhlife authored Oct 31, 2024
2 parents c088d85 + 3c8869c commit b4256c0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
9 changes: 8 additions & 1 deletion js/versions.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
export const versions = {
"version": "0.34.0d",
"version": "0.34.0e",
"releaseDate": "2024-10-31",
"name": "ComfyUI-Griptape",
"description": "Griptape integration for ComfyUI",
"author": "Jason Schleifer",
"repository": "https://github.com/griptape-ai/ComfyUI-Griptape",
"changelog": [
{
"version": "0.34.0e",
"date": "2024-11-1",
"changes": [
"Fixed base agent",
]
},
{
"version": "0.34.0d",
"date": "2024-11-1",
Expand Down
9 changes: 9 additions & 0 deletions nodes/agent/gtComfyAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from griptape.structures import Agent

from ...py.griptape_config import get_config
from ...py.griptape_settings import GriptapeSettings

default_prompt = "{{ input_string }}"

Expand All @@ -25,7 +26,15 @@ def __init__(self, *args, **kwargs):
kwargs["prompt_driver"] = Defaults.drivers_config.prompt_driver
else:
# Set the default config
settings = GriptapeSettings()
api_key = settings.get_settings_key_or_use_env("OPENAI_API_KEY")
Defaults.drivers_config = OpenAiDriversConfig()
Defaults.drivers_config.prompt_driver.api_key = api_key
Defaults.drivers_config.embedding_driver.api_key = api_key
Defaults.drivers_config.text_to_speech_driver.api_key = api_key
Defaults.drivers_config.audio_transcription_driver.api_key = api_key
Defaults.drivers_config.image_generation_driver.api_key = api_key

else:
Defaults.drivers_config = drivers_config

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "comfyui-griptape"
version = "1.0.14"
version = "1.0.15"
description = "Griptape LLM(Large Language Model) Nodes for ComfyUI."
authors = ["Jason Schleifer <[email protected]>"]
readme = "README.md"
Expand All @@ -26,7 +26,7 @@ priority = "explicit"
[project]
name = "comfyui-griptape"
description = "Griptape LLM(Large Language Model) Nodes for ComfyUI."
version = "1.0.14"
version = "1.0.15"
license = {file = "LICENSE"}
dependencies = ["griptape[all]==0.34.0", "python-dotenv"]

Expand Down

0 comments on commit b4256c0

Please sign in to comment.