Skip to content

Commit

Permalink
Merge pull request #224 from griptape-ai:220-default-agent-not-readin…
Browse files Browse the repository at this point in the history
…g-api-key-correctly

version bump and updated changelog
  • Loading branch information
shhlife authored Jan 8, 2025
2 parents ae80168 + be07b16 commit 213e0f9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
### Security -->

## [2.1.06] - 2025-09-01
### Fixed
- Set Default Driver wasn't working correctly due to API key not being saved (https://github.com/griptape-ai/ComfyUI-Griptape/issues/220). That's now resolved.

## [2.1.05] - 2025-04-01
### Fixed
- `openai_utils` no longer breaks startup if OPENAI_API_KEY is incorrect.
Expand Down
9 changes: 9 additions & 0 deletions nodes/agent/gtUISetDefaultAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ def run(self, **kwargs):
config = kwargs.get("config", None)
if config:
config_dict = config.to_dict()
# grab the API keys as well
for key in config_dict.keys():
driver_type = f"_{key}"
driver = getattr(config, driver_type, None)
if driver:
if hasattr(driver, "api_key"):
api_key = driver.api_key
config_dict[key]["api_key"] = api_key

settings.overwrite_settings_key("Griptape.default_config", config_dict)
settings.save_settings()
else:
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 = "2.1.05"
version = "2.1.06"
description = "Griptape LLM(Large Language Model) Nodes for ComfyUI."
authors = ["Jason Schleifer <[email protected]>"]
readme = "README.md"
Expand All @@ -9,7 +9,7 @@ readme = "README.md"
[project]
name = "comfyui-griptape"
description = "Griptape LLM(Large Language Model) Nodes for ComfyUI."
version = "2.1.05"
version = "2.1.06"
license = {file = "LICENSE"}
dependencies = ["attrs==^24.3.0", "openai==^1.58.1", "griptape[all]==^1.1.0", "python-dotenv", "poetry==1.8.5", "griptape-black-forest @ git+https://github.com/griptape-ai/griptape-black-forest.git"]

Expand Down

0 comments on commit 213e0f9

Please sign in to comment.