Skip to content

Commit

Permalink
Merge pull request #157 from griptape-ai:dev
Browse files Browse the repository at this point in the history
* Upgrade to Griptape Framework v0.34.1
  * Fix to `WebScraperTool` provides better results when using `off_prompt`.
* Fixed bug where urls were dropping any text after the `:`. Example: "What is https://griptape.ai" was being converted to "What is https:". This is due to the `dynamicprompt` functionality of ComfyUI, so I've disabled that.
* Added context string to all BOOLEAN parameters to give the user a better idea as to what the particular boolean option does. For example, intead of just `True` or `False`, the tools now explain `off_prompt`.
  • Loading branch information
shhlife authored Nov 5, 2024
2 parents 76e52ac + 2f03102 commit 4f21c45
Show file tree
Hide file tree
Showing 18 changed files with 113 additions and 19 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@ You can previous and download more examples [here](examples/README.md).

## Recent Changelog

### Nov 5, 2024
### Nov 6, 2024
* Upgrade to Griptape Framework v0.34.1
* Fix to `WebScraperTool` provides better results when using `off_prompt`.
* Fixed bug where urls were dropping any text after the `:`. Example: "What is https://griptape.ai" was being converted to "What is https:". This is due to the `dynamicprompt` functionality of ComfyUI, so I've disabled that.
* Added context string to all BOOLEAN parameters to give the user a better idea as to what the particular boolean option does. For example, intead of just `True` or `False`, the tools now explain `off_prompt`.

![WebsScraper tool with off_prompt](docs/images/off_prompt_parameter.png)

### Nov 4, 2024
* Fixed bug where OPENAI_API_KEY was still required, and was causing some install issues.
Expand Down
Binary file added docs/images/off_prompt_parameter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.0g",
"version": "0.34.1",
"releaseDate": "2024-11-5",
"name": "ComfyUI-Griptape",
"description": "Griptape integration for ComfyUI",
"author": "Jason Schleifer",
"repository": "https://github.com/griptape-ai/ComfyUI-Griptape",
"changelog": [
{
"version": "0.34.1",
"date": "2024-11-6",
"changes": [
"Fixed issue with `dynamicprompt` inputs",
]
},
{
"version": "0.34.0g",
"date": "2024-11-5",
Expand Down
9 changes: 8 additions & 1 deletion nodes/config/depricated/gtUILMStudioStructureConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ def INPUT_TYPES(s):
)
inputs["optional"].update(
{
"use_native_tools": ("BOOLEAN", {"default": False}),
"use_native_tools": (
"BOOLEAN",
{
"default": False,
"label_on": "True (LLM-native tool calling)",
"label_off": "False (Griptape tool calling)",
},
),
}
)
return inputs
Expand Down
9 changes: 8 additions & 1 deletion nodes/config/gtUIBaseConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ def INPUT_TYPES(s):
),
# "stream": ([True, False], {"default": False}),
"env": ("ENV", {"default": None}),
"use_native_tools": ("BOOLEAN", {"default": True}),
"use_native_tools": (
"BOOLEAN",
{
"default": True,
"label_on": "True (LLM-native tool calling)",
"label_off": "False (Griptape tool calling)",
},
),
"max_tokens": (
"INT",
{
Expand Down
8 changes: 6 additions & 2 deletions nodes/drivers/gtUIBasePromptDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def INPUT_TYPES(s):
inputs["optional"].update(
{
"model": ("STRING", {"tooltip": "The prompt model to use"}),
# "stream": ("BOOLEAN", {"default": False, "tooltip": "Enable or disable streaming"}),
"max_attempts_on_fail": (
"INT",
{
Expand Down Expand Up @@ -40,7 +39,12 @@ def INPUT_TYPES(s):
),
"use_native_tools": (
"BOOLEAN",
{"default": True, "tooltip": "Use native tools for the LLM."},
{
"default": True,
"tooltip": "Use native tools for the LLM.",
"label_on": "True (LLM-native tool calling)",
"label_off": "False (Griptape tool calling)",
},
),
"max_tokens": (
"INT",
Expand Down
7 changes: 6 additions & 1 deletion nodes/drivers/gtUILMStudioChatPromptDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ def INPUT_TYPES(s):
),
"use_native_tools": (
"BOOLEAN",
{"default": False, "tooltip": "Whether to use native tools."},
{
"default": False,
"tooltip": "Whether to use native tools.",
"label_on": "True (LLM-native tool calling)",
"label_off": "False (Griptape tool calling)",
},
),
"api_key": (
"STRING",
Expand Down
2 changes: 2 additions & 0 deletions nodes/drivers/gtUILMStudioEmbeddingDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def INPUT_TYPES(s):
{
"default": False,
"tooltip": "Enable or disable the use of native tools.",
"label_on": "True (LLM-native tool calling)",
"label_off": "False (Griptape tool calling)",
},
),
"api_key": (
Expand Down
7 changes: 6 additions & 1 deletion nodes/drivers/gtUILeonardoImageGenerationDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ def INPUT_TYPES(s):
),
"use_custom_model": (
"BOOLEAN",
{"default": False, "tooltip": "Enable to use a custom model ID."},
{
"default": False,
"tooltip": "Enable to use a custom model ID.",
"label_on": "True (Use Custom Model ID)",
"label_off": "False (Choose from model list)",
},
),
"custom_model": (
"STRING",
Expand Down
2 changes: 2 additions & 0 deletions nodes/drivers/gtUILocalVectorStoreDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def INPUT_TYPES(s):
{
"default": False,
"tooltip": "Enable or disable persistence to a file.",
"label_on": "True (Save data to file)",
"label_off": "False (Keep data in memory)",
},
),
"persist_filename": (
Expand Down
11 changes: 10 additions & 1 deletion nodes/tools/gtUIAudioTranscriptionClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ class gtUIAudioTranscriptionClient(gtUIBaseTool):
@classmethod
def INPUT_TYPES(s):
return {
"required": {"off_prompt": ("BOOLEAN", {"default": True})},
"required": {
"off_prompt": (
"BOOLEAN",
{
"default": True,
"label_on": "True (Keep output private)",
"label_off": "False (Provide output to LLM)",
},
)
},
"optional": {"driver": ("DRIVER", {"default": None})},
}

Expand Down
11 changes: 10 additions & 1 deletion nodes/tools/gtUIBaseTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ def __init__(self):
@classmethod
def INPUT_TYPES(s):
return {
"required": {"off_prompt": ("BOOLEAN", {"default": False})},
"required": {
"off_prompt": (
"BOOLEAN",
{
"default": False,
"label_on": "True (Keep output private)",
"label_off": "False (Provide output to LLM)",
},
)
},
"optional": {},
"hidden": {},
}
Expand Down
11 changes: 10 additions & 1 deletion nodes/tools/gtUIFileManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ class gtUIFileManager(gtUIBaseTool):
@classmethod
def INPUT_TYPES(s):
return {
"required": {"off_prompt": ("BOOLEAN", {"default": True})},
"required": {
"off_prompt": (
"BOOLEAN",
{
"default": True,
"label_on": "True (Keep output private)",
"label_off": "False (Provide output to LLM)",
},
)
},
}

def create(self, off_prompt, workdir=""):
Expand Down
9 changes: 8 additions & 1 deletion nodes/tools/gtUIKnowledgeBaseTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ class gtUIKnowledgeBaseTool(gtUIBaseTool):
def INPUT_TYPES(s):
return {
"required": {
"off_prompt": ("BOOLEAN", {"default": False}),
"off_prompt": (
"BOOLEAN",
{
"default": False,
"label_on": "True (Keep output private)",
"label_off": "False (Provide output to LLM)",
},
),
"api_key_environment_variable": (
"STRING",
{"default": "GRIPTAPE_CLOUD_API_KEY"},
Expand Down
11 changes: 10 additions & 1 deletion nodes/tools/gtUITextToSpeechClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ def INPUT_TYPES(s):
# return inputs

return {
"required": {"off_prompt": ("BOOLEAN", {"default": True})},
"required": {
"off_prompt": (
"BOOLEAN",
{
"default": True,
"label_on": "True (Keep output private)",
"label_off": "False (Provide output to LLM)",
},
)
},
"optional": {"driver": ("TEXT_TO_SPEECH_DRIVER", {"default": None})},
}

Expand Down
9 changes: 8 additions & 1 deletion nodes/utils/gtUICreateAgentModelfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ def INPUT_TYPES(s):
"base_model": ((), {}),
"agent": ("AGENT", {}),
"include_conversation_memory": ("BOOLEAN", {"default": True}),
"include_rulesets": ("BOOLEAN", {"default": True}),
"include_rulesets": (
"BOOLEAN",
{
"default": True,
"label_on": "True (Use default rulesets)",
"label_off": "False (Create your own rulesets)",
},
),
}
}
return inputs
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tool.poetry]
name = "comfyui-griptape"
version = "1.0.18"
version = "1.0.19"
description = "Griptape LLM(Large Language Model) Nodes for ComfyUI."
authors = ["Jason Schleifer <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
python-dotenv = "^1.0.1"
griptape = { version = "^0.34.0", extras = ["all"]}
griptape = { version = "^0.34.1", extras = ["all"]}

[tool.poetry.group.dev.dependencies]
icecream = "^2.1.3"
Expand All @@ -26,9 +26,9 @@ priority = "explicit"
[project]
name = "comfyui-griptape"
description = "Griptape LLM(Large Language Model) Nodes for ComfyUI."
version = "1.0.18"
version = "1.0.19"
license = {file = "LICENSE"}
dependencies = ["griptape[all]==0.34.0", "python-dotenv"]
dependencies = ["griptape[all]==0.34.1", "python-dotenv"]

[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,2 +1,2 @@
griptape[all]==0.34.0
griptape[all]==0.34.1
python-dotenv

0 comments on commit 4f21c45

Please sign in to comment.