diff --git a/README.md b/README.md index bc6d4f0..83f7f34 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,10 @@ You can previous and download more examples [here](examples/README.md). ## Recent Changelog +### Oct 31, 2024 +* Added tooltips for all drivers to help clarify properties +* Added fix for Ollama Driver Config so it wouldn't fail if no embedding driver was specified. + ### Oct 30, 2024 * Updated to Griptape Framework v0.34.0 * **Breaking Changes** diff --git a/js/versions.js b/js/versions.js index 5d8a1c7..90e4f1b 100644 --- a/js/versions.js +++ b/js/versions.js @@ -1,11 +1,18 @@ export const versions = { - "version": "0.34.0", + "version": "0.34.0a", "releaseDate": "2024-10-30", "name": "ComfyUI-Griptape", "description": "Griptape integration for ComfyUI", "author": "Jason Schleifer", "repository": "https://github.com/griptape-ai/ComfyUI-Griptape", "changelog": [ + { + "version": "0.34.0a", + "date": "2024-10-31", + "changes": [ + "fix for ollama driver to not break if no embedding driver specified", + ] + }, { "version": "0.34.0", "date": "2024-10-30", diff --git a/nodes/config/gtUIOllamaDriversConfig.py b/nodes/config/gtUIOllamaDriversConfig.py index 4162274..453a867 100644 --- a/nodes/config/gtUIOllamaDriversConfig.py +++ b/nodes/config/gtUIOllamaDriversConfig.py @@ -5,6 +5,7 @@ # StructureGlobalDriversConfig, from griptape.drivers import ( + DummyEmbeddingDriver, LocalVectorStoreDriver, OllamaEmbeddingDriver, OllamaPromptDriver, @@ -59,11 +60,14 @@ def create(self, **kwargs): drivers_config_params["prompt_driver"] = OllamaPromptDriver( **prompt_driver_params ) - drivers_config_params["embedding_driver"] = OllamaEmbeddingDriver( - **embedding_driver_params - ) + if "model" not in embedding_driver_params: + drivers_config_params["embedding_driver"] = DummyEmbeddingDriver() + else: + drivers_config_params["embedding_driver"] = OllamaEmbeddingDriver( + **embedding_driver_params + ) drivers_config_params["vector_store_driver"] = LocalVectorStoreDriver( - embedding_driver=OllamaEmbeddingDriver(**embedding_driver_params) + embedding_driver=drivers_config_params["embedding_driver"] ) try: diff --git a/nodes/drivers/gtUIAmazonBedrockPromptDriver.py b/nodes/drivers/gtUIAmazonBedrockPromptDriver.py index b460458..a5d15e8 100644 --- a/nodes/drivers/gtUIAmazonBedrockPromptDriver.py +++ b/nodes/drivers/gtUIAmazonBedrockPromptDriver.py @@ -39,15 +39,24 @@ def INPUT_TYPES(s): { "aws_access_key_id_env_var": ( "STRING", - {"default": DEFAULT_AWS_ACCESS_KEY_ID}, + { + "default": DEFAULT_AWS_ACCESS_KEY_ID, + "tooltip": "Enter the name of the environment variable for your AWS_ACCESS_KEY_ID, not your actual key.", + }, ), "aws_secret_access_key_env_var": ( "STRING", - {"default": DEFAULT_AWS_SECRET_ACCESS_KEY}, + { + "default": DEFAULT_AWS_SECRET_ACCESS_KEY, + "tooltip": "Enter the name of the environment variable for your AWS_SECRET_ACCESS_KEY, not your actual key.", + }, ), "aws_default_region_env_var": ( "STRING", - {"default": DEFAULT_AWS_DEFAULT_REGION}, + { + "default": DEFAULT_AWS_DEFAULT_REGION, + "tooltip": "Enter the name of the environment variable for your AWS_DEFAULT_REGION, not your actual region.", + }, ), } ) diff --git a/nodes/drivers/gtUIAmazonBedrockStableDiffusionImageGenerationDriver.py b/nodes/drivers/gtUIAmazonBedrockStableDiffusionImageGenerationDriver.py index ec9db26..8064c76 100644 --- a/nodes/drivers/gtUIAmazonBedrockStableDiffusionImageGenerationDriver.py +++ b/nodes/drivers/gtUIAmazonBedrockStableDiffusionImageGenerationDriver.py @@ -52,27 +52,60 @@ def INPUT_TYPES(s): inputs["optional"].update( { - "style_preset": (style_presets, {"default": style_presets[4]}), + "style_preset": ( + style_presets, + { + "default": style_presets[4], + "tooltip": "Select a style preset for the image generation.", + }, + ), "width": ( "INT", - {"default": 512, "min": 64, "max": 2048, "step": 64}, + { + "default": 512, + "min": 64, + "max": 2048, + "step": 64, + "tooltip": "Specify the width of the generated image.", + }, ), "height": ( "INT", - {"default": 512, "min": 64, "max": 2048, "step": 64}, + { + "default": 512, + "min": 64, + "max": 2048, + "step": 64, + "tooltip": "Specify the height of the generated image.", + }, + ), + "seed": ( + "INT", + { + "default": 12345, + "tooltip": "Set the seed for random number generation to ensure reproducibility.", + }, ), - "seed": ("INT", {"default": 12345}), "aws_access_key_id_env_var": ( "STRING", - {"default": DEFAULT_AWS_ACCESS_KEY_ID}, + { + "default": DEFAULT_AWS_ACCESS_KEY_ID, + "tooltip": "Enter the name of the environment variable for your AWS_ACCESS_KEY_ID, not your actual key.", + }, ), "aws_secret_access_key_env_var": ( "STRING", - {"default": DEFAULT_AWS_SECRET_ACCESS_KEY}, + { + "default": DEFAULT_AWS_SECRET_ACCESS_KEY, + "tooltip": "Enter the name of the environment variable for your AWS_SECRET_ACCESS_KEY, not your actual key.", + }, ), "aws_default_region_env_var": ( "STRING", - {"default": DEFAULT_AWS_DEFAULT_REGION}, + { + "default": DEFAULT_AWS_DEFAULT_REGION, + "tooltip": "Enter the name of the environment variable for your AWS_DEFAULT_REGION, not your actual region.", + }, ), } ) diff --git a/nodes/drivers/gtUIAmazonBedrockTitanEmbeddingDriver.py b/nodes/drivers/gtUIAmazonBedrockTitanEmbeddingDriver.py index b0f12d2..dc32da3 100644 --- a/nodes/drivers/gtUIAmazonBedrockTitanEmbeddingDriver.py +++ b/nodes/drivers/gtUIAmazonBedrockTitanEmbeddingDriver.py @@ -34,19 +34,31 @@ def INPUT_TYPES(s): { "embedding_model": ( models, - {"default": models[0]}, + { + "default": models[0], + "tooltip": "Select the embedding model to use.", + }, ), "aws_access_key_id_env_var": ( "STRING", - {"default": DEFAULT_AWS_ACCESS_KEY_ID}, + { + "default": DEFAULT_AWS_ACCESS_KEY_ID, + "tooltip": "Enter the name of the environment variable for your AWS_ACCESS_KEY_ID, not your actual key.", + }, ), "aws_secret_access_key_env_var": ( "STRING", - {"default": DEFAULT_AWS_SECRET_ACCESS_KEY}, + { + "default": DEFAULT_AWS_SECRET_ACCESS_KEY, + "tooltip": "Enter the name of the environment variable for your AWS_SECRET_ACCESS_KEY, not your actual key.", + }, ), "aws_default_region_env_var": ( "STRING", - {"default": DEFAULT_AWS_DEFAULT_REGION}, + { + "default": DEFAULT_AWS_DEFAULT_REGION, + "tooltip": "Enter the name of the environment variable for your AWS_DEFAULT_REGION, not your actual region.", + }, ), } ) diff --git a/nodes/drivers/gtUIAmazonBedrockTitanImageGenerationDriver.py b/nodes/drivers/gtUIAmazonBedrockTitanImageGenerationDriver.py index 593335d..288be5b 100644 --- a/nodes/drivers/gtUIAmazonBedrockTitanImageGenerationDriver.py +++ b/nodes/drivers/gtUIAmazonBedrockTitanImageGenerationDriver.py @@ -35,21 +35,45 @@ def INPUT_TYPES(s): { "image_generation_model": ( "STRING", - {"default": "amazon.titan-image-generator-v1"}, + { + "default": "amazon.titan-image-generator-v1", + "tooltip": "Select the image generation model to use.", + }, + ), + "size": ( + sizes, + { + "default": sizes[0], + "tooltip": "Choose the size of the generated image.", + }, + ), + "seed": ( + "INT", + { + "default": 10342349342, + "tooltip": "Set the seed for random number generation.", + }, ), - "size": (sizes, {"default": sizes[0]}), - "seed": ("INT", {"default": 10342349342}), "aws_access_key_id_env_var": ( "STRING", - {"default": DEFAULT_AWS_ACCESS_KEY_ID}, + { + "default": DEFAULT_AWS_ACCESS_KEY_ID, + "tooltip": "Enter the name of the environment variable for your AWS_ACCESS_KEY_ID, not your actual key.", + }, ), "aws_secret_access_key_env_var": ( "STRING", - {"default": DEFAULT_AWS_SECRET_ACCESS_KEY}, + { + "default": DEFAULT_AWS_SECRET_ACCESS_KEY, + "tooltip": "Enter the name of the environment variable for your AWS_SECRET_ACCESS_KEY, not your actual key.", + }, ), "aws_default_region_env_var": ( "STRING", - {"default": DEFAULT_AWS_DEFAULT_REGION}, + { + "default": DEFAULT_AWS_DEFAULT_REGION, + "tooltip": "Enter the name of the environment variable for your AWS_DEFAULT_REGION, not your actual region.", + }, ), } ) diff --git a/nodes/drivers/gtUIAmazonOpenSearchVectorStoreDriver.py b/nodes/drivers/gtUIAmazonOpenSearchVectorStoreDriver.py index 9767ccc..aeb13dd 100644 --- a/nodes/drivers/gtUIAmazonOpenSearchVectorStoreDriver.py +++ b/nodes/drivers/gtUIAmazonOpenSearchVectorStoreDriver.py @@ -31,19 +31,40 @@ def INPUT_TYPES(s): inputs["optional"].update( { - "host_env": ("STRING", {"default": DEFAULT_HOST_ENV}), - "index_env": ("STRING", {"default": DEFAULT_INDEX_ENV}), + "host_env": ( + "STRING", + { + "default": DEFAULT_HOST_ENV, + "tooltip": "Enter the name of the environment variable for your AMAZON_OPENSEARCH_HOST, not your actual host.", + }, + ), + "index_env": ( + "STRING", + { + "default": DEFAULT_INDEX_ENV, + "tooltip": "Enter the name of the environment variable for your AMAZON_OPENSEARCH_INDEX_NAME, not your actual index name.", + }, + ), "aws_access_key_id_env_var": ( "STRING", - {"default": DEFAULT_AWS_ACCESS_KEY_ID}, + { + "default": DEFAULT_AWS_ACCESS_KEY_ID, + "tooltip": "Enter the name of the environment variable for your AWS_ACCESS_KEY_ID, not your actual key.", + }, ), "aws_secret_access_key_env_var": ( "STRING", - {"default": DEFAULT_AWS_SECRET_ACCESS_KEY}, + { + "default": DEFAULT_AWS_SECRET_ACCESS_KEY, + "tooltip": "Enter the name of the environment variable for your AWS_SECRET_ACCESS_KEY, not your actual key.", + }, ), "aws_default_region_env_var": ( "STRING", - {"default": DEFAULT_AWS_DEFAULT_REGION}, + { + "default": DEFAULT_AWS_DEFAULT_REGION, + "tooltip": "Enter the name of the environment variable for your AWS_DEFAULT_REGION, not your actual region.", + }, ), } ) diff --git a/nodes/drivers/gtUIAmazonSageMakerJumpstartEmbeddingDriver.py b/nodes/drivers/gtUIAmazonSageMakerJumpstartEmbeddingDriver.py index 36787fb..813fd66 100644 --- a/nodes/drivers/gtUIAmazonSageMakerJumpstartEmbeddingDriver.py +++ b/nodes/drivers/gtUIAmazonSageMakerJumpstartEmbeddingDriver.py @@ -27,19 +27,40 @@ def INPUT_TYPES(s): inputs["optional"].update(base_optional_inputs) inputs["optional"].update( { - "embedding_model": ("STRING", {"default": default_model}), - "endpoint": ("STRING", {"default": default_endpoint}), + "embedding_model": ( + "STRING", + { + "default": default_model, + "tooltip": "Specify the embedding model to use.", + }, + ), + "endpoint": ( + "STRING", + { + "default": default_endpoint, + "tooltip": "Specify the SageMaker endpoint to use.", + }, + ), "aws_access_key_id_env_var": ( "STRING", - {"default": DEFAULT_AWS_ACCESS_KEY_ID}, + { + "default": DEFAULT_AWS_ACCESS_KEY_ID, + "tooltip": "Enter the name of the environment variable for your AWS_ACCESS_KEY_ID, not your actual key.", + }, ), "aws_secret_access_key_env_var": ( "STRING", - {"default": DEFAULT_AWS_SECRET_ACCESS_KEY}, + { + "default": DEFAULT_AWS_SECRET_ACCESS_KEY, + "tooltip": "Enter the name of the environment variable for your AWS_SECRET_ACCESS_KEY, not your actual key.", + }, ), "aws_default_region_env_var": ( "STRING", - {"default": DEFAULT_AWS_DEFAULT_REGION}, + { + "default": DEFAULT_AWS_DEFAULT_REGION, + "tooltip": "Enter the name of the environment variable for your AWS_DEFAULT_REGION, not your actual region.", + }, ), } ) diff --git a/nodes/drivers/gtUIAmazonSageMakerJumpstartPromptDriver.py b/nodes/drivers/gtUIAmazonSageMakerJumpstartPromptDriver.py index e37d0eb..fb3b957 100644 --- a/nodes/drivers/gtUIAmazonSageMakerJumpstartPromptDriver.py +++ b/nodes/drivers/gtUIAmazonSageMakerJumpstartPromptDriver.py @@ -18,19 +18,40 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "model": ("STRING", {"default": default_model}), - "endpoint": ("STRING", {"default": default_endpoint}), + "model": ( + "STRING", + { + "default": default_model, + "tooltip": "Specify the model to use. Default is Meta-Llama-3-8B-Instruct.", + }, + ), + "endpoint": ( + "STRING", + { + "default": default_endpoint, + "tooltip": "Specify the SageMaker endpoint to use.", + }, + ), "aws_access_key_id_env_var": ( "STRING", - {"default": DEFAULT_AWS_ACCESS_KEY_ID}, + { + "default": DEFAULT_AWS_ACCESS_KEY_ID, + "tooltip": "Enter the name of the environment variable for your AWS_ACCESS_KEY_ID, not your actual key.", + }, ), "aws_secret_access_key_env_var": ( "STRING", - {"default": DEFAULT_AWS_SECRET_ACCESS_KEY}, + { + "default": DEFAULT_AWS_SECRET_ACCESS_KEY, + "tooltip": "Enter the name of the environment variable for your AWS_SECRET_ACCESS_KEY, not your actual key.", + }, ), "aws_default_region_env_var": ( "STRING", - {"default": DEFAULT_AWS_DEFAULT_REGION}, + { + "default": DEFAULT_AWS_DEFAULT_REGION, + "tooltip": "Enter the name of the environment variable for your AWS_DEFAULT_REGION, not your actual region.", + }, ), } ) diff --git a/nodes/drivers/gtUIAnthropicPromptDriver.py b/nodes/drivers/gtUIAnthropicPromptDriver.py index 85673f7..615bfb9 100644 --- a/nodes/drivers/gtUIAnthropicPromptDriver.py +++ b/nodes/drivers/gtUIAnthropicPromptDriver.py @@ -29,10 +29,22 @@ def INPUT_TYPES(s): inputs["optional"].update(base_optional_inputs) # Set model default - inputs["optional"]["model"] = (models, {"default": models[0]}) + inputs["optional"]["model"] = ( + models, + { + "default": models[0], + "tooltip": "Select the model you want to use from the available options.", + }, + ) inputs["optional"].update( { - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY}), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY, + "tooltip": "Enter the name of the environment variable for your ANTHROPIC_API_KEY key, not your actual key.", + }, + ), "top_p": ( "FLOAT", { diff --git a/nodes/drivers/gtUIAzureMongoDbVectorStoreDriver.py b/nodes/drivers/gtUIAzureMongoDbVectorStoreDriver.py index d8b5180..84bf6de 100644 --- a/nodes/drivers/gtUIAzureMongoDbVectorStoreDriver.py +++ b/nodes/drivers/gtUIAzureMongoDbVectorStoreDriver.py @@ -22,16 +22,55 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "host_env": ("STRING", {"default": DEFAULT_HOST_ENV}), - "username_env": ("STRING", {"default": DEFAULT_USERNAME_ENV}), - "password_env": ("STRING", {"default": DEFAULT_PASSWORD_ENV}), - "database_name_env": ("STRING", {"default": DEFAULT_DATABASE_NAME_ENV}), + "host_env": ( + "STRING", + { + "default": DEFAULT_HOST_ENV, + "tooltip": "Enter the name of the environment variable for AZURE_MONGODB_HOST, not the actual host.", + }, + ), + "username_env": ( + "STRING", + { + "default": DEFAULT_USERNAME_ENV, + "tooltip": "Enter the name of the environment variable for AZURE_MONGODB_USERNAME, not the actual username.", + }, + ), + "password_env": ( + "STRING", + { + "default": DEFAULT_PASSWORD_ENV, + "tooltip": "Enter the name of the environment variable for AZURE_MONGODB_PASSWORD, not the actual password.", + }, + ), + "database_name_env": ( + "STRING", + { + "default": DEFAULT_DATABASE_NAME_ENV, + "tooltip": "Enter the name of the environment variable for AZURE_MONGODB_DATABASE_NAME, not the actual database name.", + }, + ), "collection_name_env": ( "STRING", - {"default": DEFAULT_COLLECTION_NAME_ENV}, + { + "default": DEFAULT_COLLECTION_NAME_ENV, + "tooltip": "Enter the name of the environment variable for AZURE_MONGODB_COLLECTION_NAME, not the actual collection name.", + }, + ), + "index_name_env": ( + "STRING", + { + "default": DEFAULT_INDEX_NAME_ENV, + "tooltip": "Enter the name of the environment variable for AZURE_MONGODB_INDEX_NAME, not the actual index name.", + }, + ), + "vector_path_env": ( + "STRING", + { + "default": DEFAULT_VECTOR_PATH_ENV, + "tooltip": "Enter the name of the environment variable for AZURE_MONGODB_VECTOR_PATH, not the actual vector path.", + }, ), - "index_name_env": ("STRING", {"default": DEFAULT_INDEX_NAME_ENV}), - "vector_path_env": ("STRING", {"default": DEFAULT_VECTOR_PATH_ENV}), } ) diff --git a/nodes/drivers/gtUIAzureOpenAiChatPromptDriver.py b/nodes/drivers/gtUIAzureOpenAiChatPromptDriver.py index 2630864..c500604 100644 --- a/nodes/drivers/gtUIAzureOpenAiChatPromptDriver.py +++ b/nodes/drivers/gtUIAzureOpenAiChatPromptDriver.py @@ -32,9 +32,18 @@ def INPUT_TYPES(s): "response_format": (["default", "json_object"], {"default": "default"}), "endpoint_env_var": ( "STRING", - {"default": DEFAULT_AZURE_ENDPOINT_ENV_VAR}, + { + "default": DEFAULT_AZURE_ENDPOINT_ENV_VAR, + "tooltip": "Enter the name of the environment variable for AZURE_OPENAI_ENDPOINT, not the actual endpoint.", + }, + ), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Enter the name of the environment variable for AZURE_OPENAI_API_KEY, not the actual API key.", + }, ), - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY_ENV_VAR}), } ) diff --git a/nodes/drivers/gtUIAzureOpenAiEmbeddingDriver.py b/nodes/drivers/gtUIAzureOpenAiEmbeddingDriver.py index bf4df85..ea23a41 100644 --- a/nodes/drivers/gtUIAzureOpenAiEmbeddingDriver.py +++ b/nodes/drivers/gtUIAzureOpenAiEmbeddingDriver.py @@ -13,9 +13,6 @@ class gtUIAzureOpenAiEmbeddingDriver(gtUIBaseEmbeddingDriver): @classmethod def INPUT_TYPES(s): inputs = super().INPUT_TYPES() - # Get the base required and optional inputs - base_required_inputs = inputs["required"] - base_optional_inputs = inputs["optional"] inputs["required"].update() inputs["optional"].update( @@ -26,11 +23,17 @@ def INPUT_TYPES(s): ), "endpoint_env_var": ( "STRING", - {"default": DEFAULT_AZURE_ENDPOINT_ENV_VAR}, + { + "default": DEFAULT_AZURE_ENDPOINT_ENV_VAR, + "tooltip": "Enter the name of the environment variable for AZURE_OPENAI_ENDPOINT, not the actual endpoint.", + }, ), "api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Enter the name of the environment variable for AZURE_OPENAI_API_KEY, not the actual API key.", + }, ), } ) diff --git a/nodes/drivers/gtUIAzureOpenAiImageGenerationDriver.py b/nodes/drivers/gtUIAzureOpenAiImageGenerationDriver.py index 8b86fda..38f81d2 100644 --- a/nodes/drivers/gtUIAzureOpenAiImageGenerationDriver.py +++ b/nodes/drivers/gtUIAzureOpenAiImageGenerationDriver.py @@ -18,16 +18,40 @@ def INPUT_TYPES(s): inputs = super().INPUT_TYPES() inputs["optional"].update( { - "image_generation_model": (models, {"default": models[0]}), - "image_deployment_name": ("STRING", {"default": models[0]}), - "size": (sizes, {"default": sizes[2]}), + "image_generation_model": ( + models, + { + "default": models[0], + "tooltip": "Select the model for image generation.", + }, + ), + "image_deployment_name": ( + "STRING", + { + "default": models[0], + "tooltip": "Enter the deployment name for the image generation model.", + }, + ), + "size": ( + sizes, + { + "default": sizes[2], + "tooltip": "Select the size of the generated image.", + }, + ), "image_endpoint_env_var": ( "STRING", - {"default": AZURE_ENDPOINT_ENV_VAR}, + { + "default": AZURE_ENDPOINT_ENV_VAR, + "tooltip": "Enter the name of the environment variable for AZURE_OPENAI_DALL_E_3_ENDPOINT, not the actual endpoint.", + }, ), "image_api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Enter the name of the environment variable for AZURE_OPENAI_DALL_E_3_API_KEY, not the actual API key.", + }, ), } ) diff --git a/nodes/drivers/gtUIBasePromptDriver.py b/nodes/drivers/gtUIBasePromptDriver.py index 576c4a4..0def507 100644 --- a/nodes/drivers/gtUIBasePromptDriver.py +++ b/nodes/drivers/gtUIBasePromptDriver.py @@ -11,17 +11,37 @@ def INPUT_TYPES(s): inputs["optional"].update( { "model": ("STRING", {"tooltip": "The prompt model to use"}), - # "stream": ("BOOLEAN", {"default": False}), + # "stream": ("BOOLEAN", {"default": False, "tooltip": "Enable or disable streaming"}), "max_attempts_on_fail": ( "INT", - {"default": 10, "min": 1, "max": 100}, + { + "default": 10, + "min": 1, + "max": 100, + "tooltip": "Maximum attempts on failure", + }, ), "temperature": ( "FLOAT", - {"default": 0.1, "min": 0.0, "max": 1.0, "step": 0.01}, + { + "default": 0.1, + "min": 0.0, + "max": 1.0, + "step": 0.01, + "tooltip": "Temperature for sampling", + }, + ), + "seed": ( + "INT", + { + "default": 10342349342, + "tooltip": "Seed for random number generation", + }, + ), + "use_native_tools": ( + "BOOLEAN", + {"default": True, "tooltip": "Use native tools for the LLM."}, ), - "seed": ("INT", {"default": 10342349342}), - "use_native_tools": ("BOOLEAN", {"default": True}), "max_tokens": ( "INT", { diff --git a/nodes/drivers/gtUIBaseTextToSpeechDriver.py b/nodes/drivers/gtUIBaseTextToSpeechDriver.py index 9bc08f7..6ef9e3b 100644 --- a/nodes/drivers/gtUIBaseTextToSpeechDriver.py +++ b/nodes/drivers/gtUIBaseTextToSpeechDriver.py @@ -13,9 +13,18 @@ def INPUT_TYPES(s): "optional": { "text_to_speech_model": ( "STRING", - {"default": "eleven_multilingual_v2"}, + { + "default": "eleven_multilingual_v2", + "tooltip": "Select the text-to-speech model to use.", + }, + ), + "voice": ( + "STRING", + { + "default": "Matilda", + "tooltip": "Select the voice for the text-to-speech output.", + }, ), - "voice": ("STRING", {"default": "Matilda"}), }, } diff --git a/nodes/drivers/gtUIBaseVectorStoreDriver.py b/nodes/drivers/gtUIBaseVectorStoreDriver.py index 3cd4b33..e1269fd 100644 --- a/nodes/drivers/gtUIBaseVectorStoreDriver.py +++ b/nodes/drivers/gtUIBaseVectorStoreDriver.py @@ -19,7 +19,15 @@ def INPUT_TYPES(s): inputs = super().INPUT_TYPES() inputs["required"].update() inputs["optional"].update( - {"embedding_driver": ("EMBEDDING_DRIVER", {"default": None})} + { + "embedding_driver": ( + "EMBEDDING_DRIVER", + { + "default": None, + "tooltip": "Select an embedding driver or leave as default.", + }, + ) + } ) return inputs diff --git a/nodes/drivers/gtUICohereEmbeddingDriver.py b/nodes/drivers/gtUICohereEmbeddingDriver.py index b5bfa3b..b9afb08 100644 --- a/nodes/drivers/gtUICohereEmbeddingDriver.py +++ b/nodes/drivers/gtUICohereEmbeddingDriver.py @@ -19,15 +19,24 @@ def INPUT_TYPES(s): { "embedding_model": ( models, - {"default": models[0]}, + { + "default": models[0], + "tooltip": "Select the embedding model to use.", + }, ), "input_types": ( input_types, - {"default": input_types[0]}, + { + "default": input_types[0], + "tooltip": "Select the type of input for embedding.", + }, ), "cohere_api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable name for the Cohere API key. Do not enter your actual API key.", + }, ), } ) diff --git a/nodes/drivers/gtUICoherePromptDriver.py b/nodes/drivers/gtUICoherePromptDriver.py index d97829a..f39b03d 100644 --- a/nodes/drivers/gtUICoherePromptDriver.py +++ b/nodes/drivers/gtUICoherePromptDriver.py @@ -21,10 +21,19 @@ def INPUT_TYPES(s): inputs["optional"].update( { - "model": (models, {"default": models[0]}), + "model": ( + models, + { + "default": models[0], + "tooltip": "Select the Cohere model to use.", + }, + ), "cohere_api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable for the Cohere API key. Do not use your actual API key directly.", + }, ), } ) diff --git a/nodes/drivers/gtUICohereRerankDriver.py b/nodes/drivers/gtUICohereRerankDriver.py index bcf0038..0056462 100644 --- a/nodes/drivers/gtUICohereRerankDriver.py +++ b/nodes/drivers/gtUICohereRerankDriver.py @@ -17,15 +17,24 @@ def INPUT_TYPES(s): { "models": ( models, - {"default": models[0]}, + { + "default": models[0], + "tooltip": "Select the model to use for reranking.", + }, ), "top_n": ( "INT", - {"default": 5}, + { + "default": 5, + "tooltip": "Specify the number of top results to return.", + }, ), "cohere_api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable name for the Cohere API key. Do not use your actual API key here.", + }, ), } ) diff --git a/nodes/drivers/gtUIElevenLabsTextToSpeechDriver.py b/nodes/drivers/gtUIElevenLabsTextToSpeechDriver.py index 9ed6658..f654a41 100644 --- a/nodes/drivers/gtUIElevenLabsTextToSpeechDriver.py +++ b/nodes/drivers/gtUIElevenLabsTextToSpeechDriver.py @@ -16,11 +16,26 @@ def INPUT_TYPES(s): inputs["optional"].update( { - "model": ("STRING", {"default": "eleven_multilingual_v2"}), - "voice": ("STRING", {"default": "Matilda"}), + "model": ( + "STRING", + { + "default": "eleven_multilingual_v2", + "tooltip": "The model to use for text-to-speech.", + }, + ), + "voice": ( + "STRING", + { + "default": "Matilda", + "tooltip": "The voice to use for text-to-speech.", + }, + ), "api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "The environment variable name for the API key. Do not use your actual API key here.", + }, ), } ) diff --git a/nodes/drivers/gtUIGoogleEmbeddingDriver.py b/nodes/drivers/gtUIGoogleEmbeddingDriver.py index 76931a9..db3ad1d 100644 --- a/nodes/drivers/gtUIGoogleEmbeddingDriver.py +++ b/nodes/drivers/gtUIGoogleEmbeddingDriver.py @@ -26,15 +26,24 @@ def INPUT_TYPES(s): { "embedding_model": ( models, - {"default": models[0]}, + { + "default": models[0], + "tooltip": "Select the embedding model to use.", + }, ), "task_type": ( task_types, - {"default": task_types[0]}, + { + "default": task_types[0], + "tooltip": "Select the task type for the embedding.", + }, ), "google_api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable for the Google API key. Do not use your actual API key here.", + }, ), } ) diff --git a/nodes/drivers/gtUIGooglePromptDriver.py b/nodes/drivers/gtUIGooglePromptDriver.py index 33b1a1b..3991982 100644 --- a/nodes/drivers/gtUIGooglePromptDriver.py +++ b/nodes/drivers/gtUIGooglePromptDriver.py @@ -17,7 +17,10 @@ def INPUT_TYPES(s): "model": (models, {"default": models[0]}), "google_api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable name for the Google API key. Do not use your actual API key directly here.", + }, ), "top_p": ( "FLOAT", @@ -36,7 +39,7 @@ def INPUT_TYPES(s): "min": 0, "max": 500, "step": 1, - "tooltip": "Limits the number of tokens considered for each step of the generation. Pevents the model from focusing too narrowly on the top choices.", + "tooltip": "Limits the number of tokens considered for each step of the generation. Prevents the model from focusing too narrowly on the top choices.", }, ), } diff --git a/nodes/drivers/gtUIGoogleWebSearchDriver.py b/nodes/drivers/gtUIGoogleWebSearchDriver.py index 8586d84..b8bff65 100644 --- a/nodes/drivers/gtUIGoogleWebSearchDriver.py +++ b/nodes/drivers/gtUIGoogleWebSearchDriver.py @@ -14,20 +14,41 @@ def INPUT_TYPES(s): inputs = super().INPUT_TYPES() inputs["required"].update( { - "country": ("STRING", {"default": "us"}), - "language": ("STRING", {"default": "en"}), - "results_count": ("INT", {"default": 5}), + "country": ( + "STRING", + { + "default": "us", + "tooltip": "Country code for the search results.", + }, + ), + "language": ( + "STRING", + { + "default": "en", + "tooltip": "Language code for the search results.", + }, + ), + "results_count": ( + "INT", + {"default": 5, "tooltip": "Number of search results to return."}, + ), } ) inputs["optional"].update( { "api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable name for the Google API key. Do not use your actual API key here.", + }, ), "search_id_env_var": ( "STRING", - {"default": DEFAULT_GOOGLE_API_SEARCH_ID}, + { + "default": DEFAULT_GOOGLE_API_SEARCH_ID, + "tooltip": "Environment variable name for the Google API Search ID. Do not use your actual API Search ID here.", + }, ), } ) diff --git a/nodes/drivers/gtUIGriptapeCloudVectorStoreDriver.py b/nodes/drivers/gtUIGriptapeCloudVectorStoreDriver.py index 7111911..3010a27 100644 --- a/nodes/drivers/gtUIGriptapeCloudVectorStoreDriver.py +++ b/nodes/drivers/gtUIGriptapeCloudVectorStoreDriver.py @@ -20,10 +20,25 @@ def INPUT_TYPES(s): { "api_key_env_var": ( "STRING", - {"default": API_KEY_ENV}, + { + "default": API_KEY_ENV, + "tooltip": "Environment variable for the API key. Do not use your actual API key here.", + }, + ), + "base_url": ( + "STRING", + { + "default": BASE_URL, + "tooltip": "Base URL for the Griptape Cloud service.", + }, + ), + "knowledge_base_id": ( + "STRING", + { + "default": "12345-abcde-1434", + "tooltip": "ID of the knowledge base to use.", + }, ), - "base_url": ("STRING", {"default": BASE_URL}), - "knowledge_base_id": ("STRING", {"default": "12345-abcde-1434"}), } ) diff --git a/nodes/drivers/gtUIHuggingFaceHubEmbeddingDriver.py b/nodes/drivers/gtUIHuggingFaceHubEmbeddingDriver.py index 716a2f2..ee8e0ea 100644 --- a/nodes/drivers/gtUIHuggingFaceHubEmbeddingDriver.py +++ b/nodes/drivers/gtUIHuggingFaceHubEmbeddingDriver.py @@ -19,13 +19,31 @@ def INPUT_TYPES(s): { "embedding_model": ( "STRING", - {"default": default_model}, + { + "default": default_model, + "tooltip": "The model to use for embeddings.", + }, + ), + "tokenizer": ( + "STRING", + { + "default": default_tokenizer, + "tooltip": "The tokenizer to use with the model.", + }, + ), + "max_output_tokens": ( + "INT", + { + "default": 512, + "tooltip": "The maximum number of tokens for the output.", + }, ), - "tokenizer": ("STRING", {"default": default_tokenizer}), - "max_output_tokens": ("INT", {"default": 512}), "api_token_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable for the API token. Do not use your actual API key here.", + }, ), } ) diff --git a/nodes/drivers/gtUIHuggingFaceHubPromptDriver.py b/nodes/drivers/gtUIHuggingFaceHubPromptDriver.py index 0eb9158..ac62684 100644 --- a/nodes/drivers/gtUIHuggingFaceHubPromptDriver.py +++ b/nodes/drivers/gtUIHuggingFaceHubPromptDriver.py @@ -17,10 +17,19 @@ def INPUT_TYPES(s): inputs["required"].update({}) inputs["optional"].update( { - "model": ("STRING", {"default": default_model}), + "model": ( + "STRING", + { + "default": default_model, + "tooltip": "The model to use from Hugging Face Hub.", + }, + ), "api_token_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable name for the Hugging Face API token. Do not use your actual API key here.", + }, ), } ) diff --git a/nodes/drivers/gtUILMStudioChatPromptDriver.py b/nodes/drivers/gtUILMStudioChatPromptDriver.py index e9392f9..c355a47 100644 --- a/nodes/drivers/gtUILMStudioChatPromptDriver.py +++ b/nodes/drivers/gtUILMStudioChatPromptDriver.py @@ -16,11 +16,32 @@ def INPUT_TYPES(s): inputs["optional"].update( { - "model": ((), {}), - "base_url": ("STRING", {"default": default_base_url}), - "port": ("STRING", {"default": default_port}), - "use_native_tools": ("BOOLEAN", {"default": False}), - "api_key": ("STRING", {"default": DEFAULT_API_KEY}), + "model": ((), {"tooltip": "The model to use for the chat prompt."}), + "base_url": ( + "STRING", + { + "default": default_base_url, + "tooltip": "The base URL for the API.", + }, + ), + "port": ( + "STRING", + { + "default": default_port, + "tooltip": "The port to connect to the API.", + }, + ), + "use_native_tools": ( + "BOOLEAN", + {"default": False, "tooltip": "Whether to use native tools."}, + ), + "api_key": ( + "STRING", + { + "default": DEFAULT_API_KEY, + "tooltip": "API key for authentication.", + }, + ), } ) diff --git a/nodes/drivers/gtUILMStudioEmbeddingDriver.py b/nodes/drivers/gtUILMStudioEmbeddingDriver.py index baa8a34..d9cfaa3 100644 --- a/nodes/drivers/gtUILMStudioEmbeddingDriver.py +++ b/nodes/drivers/gtUILMStudioEmbeddingDriver.py @@ -16,11 +16,38 @@ def INPUT_TYPES(s): inputs["optional"].update( { - "embedding_model": ((), {}), - "base_url": ("STRING", {"default": default_base_url}), - "port": ("STRING", {"default": default_port}), - "use_native_tools": ("BOOLEAN", {"default": False}), - "api_key": ("STRING", {"default": DEFAULT_API_KEY}), + "embedding_model": ( + (), + {"tooltip": "Select the embedding model to use."}, + ), + "base_url": ( + "STRING", + { + "default": default_base_url, + "tooltip": "The base URL for the embedding service.", + }, + ), + "port": ( + "STRING", + { + "default": default_port, + "tooltip": "The port number for the embedding service.", + }, + ), + "use_native_tools": ( + "BOOLEAN", + { + "default": False, + "tooltip": "Enable or disable the use of native tools.", + }, + ), + "api_key": ( + "STRING", + { + "default": DEFAULT_API_KEY, + "tooltip": "API key for the embedding service. ", + }, + ), } ) diff --git a/nodes/drivers/gtUILeonardoImageGenerationDriver.py b/nodes/drivers/gtUILeonardoImageGenerationDriver.py index fd855c1..208b456 100644 --- a/nodes/drivers/gtUILeonardoImageGenerationDriver.py +++ b/nodes/drivers/gtUILeonardoImageGenerationDriver.py @@ -78,16 +78,34 @@ def INPUT_TYPES(s): inputs = super().INPUT_TYPES() inputs["required"].update( { - "model": (models, {"default": models[0]}), - "use_custom_model": ("BOOLEAN", {"default": False}), - "custom_model": ("STRING", {"default": ""}), + "model": ( + models, + { + "default": models[0], + "tooltip": "Select the model to use for image generation.", + }, + ), + "use_custom_model": ( + "BOOLEAN", + {"default": False, "tooltip": "Enable to use a custom model ID."}, + ), + "custom_model": ( + "STRING", + { + "default": "", + "tooltip": "Enter the custom model ID if 'Use Custom Model' is enabled.", + }, + ), } ) inputs["optional"].update( { "api_token_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable for the API key. Do not use your actual API key directly.", + }, ), } ) diff --git a/nodes/drivers/gtUILocalVectorStoreDriver.py b/nodes/drivers/gtUILocalVectorStoreDriver.py index 81e36a5..aec1eed 100644 --- a/nodes/drivers/gtUILocalVectorStoreDriver.py +++ b/nodes/drivers/gtUILocalVectorStoreDriver.py @@ -16,10 +16,20 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "persist_file": ("BOOLEAN", {"default": False}), + "persist_file": ( + "BOOLEAN", + { + "default": False, + "tooltip": "Enable or disable persistence to a file.", + }, + ), "persist_filename": ( "STRING", - {"default": default_filename, "visible": "persist_file"}, + { + "default": default_filename, + "visible": "persist_file", + "tooltip": "Filename for persisting data.", + }, ), } ) diff --git a/nodes/drivers/gtUIMarqoVectorStoreDriver.py b/nodes/drivers/gtUIMarqoVectorStoreDriver.py index 4c43c2a..9929751 100644 --- a/nodes/drivers/gtUIMarqoVectorStoreDriver.py +++ b/nodes/drivers/gtUIMarqoVectorStoreDriver.py @@ -18,9 +18,27 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY_ENV}), - "url_env": ("STRING", {"default": DEFAULT_URL_ENV}), - "index_name_env_var": ("STRING", {"default": DEFAULT_INDEX_NAME_ENV}), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY_ENV, + "tooltip": "Environment variable for the API key. Do not use your actual API key here.", + }, + ), + "url_env": ( + "STRING", + { + "default": DEFAULT_URL_ENV, + "tooltip": "Environment variable for the Marqo URL. ", + }, + ), + "index_name_env_var": ( + "STRING", + { + "default": DEFAULT_INDEX_NAME_ENV, + "tooltip": "Environment variable for the Marqo index name.", + }, + ), } ) diff --git a/nodes/drivers/gtUIMongoDbAtlasVectorStoreDriver.py b/nodes/drivers/gtUIMongoDbAtlasVectorStoreDriver.py index fb20399..e3c612a 100644 --- a/nodes/drivers/gtUIMongoDbAtlasVectorStoreDriver.py +++ b/nodes/drivers/gtUIMongoDbAtlasVectorStoreDriver.py @@ -22,16 +22,55 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "host_env": ("STRING", {"default": DEFAULT_HOST_ENV}), - "username_env": ("STRING", {"default": DEFAULT_USERNAME_ENV}), - "password_env": ("STRING", {"default": DEFAULT_PASSWORD_ENV}), - "database_name_env": ("STRING", {"default": DEFAULT_DATABASE_NAME_ENV}), + "host_env": ( + "STRING", + { + "default": DEFAULT_HOST_ENV, + "tooltip": "Environment variable for MongoDB host", + }, + ), + "username_env": ( + "STRING", + { + "default": DEFAULT_USERNAME_ENV, + "tooltip": "Environment variable for MongoDB username", + }, + ), + "password_env": ( + "STRING", + { + "default": DEFAULT_PASSWORD_ENV, + "tooltip": "Environment variable for MongoDB password", + }, + ), + "database_name_env": ( + "STRING", + { + "default": DEFAULT_DATABASE_NAME_ENV, + "tooltip": "Environment variable for MongoDB database name", + }, + ), "collection_name_env": ( "STRING", - {"default": DEFAULT_COLLECTION_NAME_ENV}, + { + "default": DEFAULT_COLLECTION_NAME_ENV, + "tooltip": "Environment variable for MongoDB collection name", + }, + ), + "index_name_env_var": ( + "STRING", + { + "default": DEFAULT_INDEX_NAME_ENV, + "tooltip": "Environment variable for MongoDB index name", + }, + ), + "vector_path_env": ( + "STRING", + { + "default": DEFAULT_VECTOR_PATH_ENV, + "tooltip": "Environment variable for MongoDB vector path", + }, ), - "index_name_env_var": ("STRING", {"default": DEFAULT_INDEX_NAME_ENV}), - "vector_path_env": ("STRING", {"default": DEFAULT_VECTOR_PATH_ENV}), } ) diff --git a/nodes/drivers/gtUIOllamaEmbeddingDriver.py b/nodes/drivers/gtUIOllamaEmbeddingDriver.py index ecd2af7..d54de83 100644 --- a/nodes/drivers/gtUIOllamaEmbeddingDriver.py +++ b/nodes/drivers/gtUIOllamaEmbeddingDriver.py @@ -1,4 +1,4 @@ -from griptape.drivers import OllamaEmbeddingDriver +from griptape.drivers import DummyEmbeddingDriver, OllamaEmbeddingDriver from .gtUIBaseEmbeddingDriver import gtUIBaseEmbeddingDriver @@ -76,7 +76,8 @@ def build_params(self, **kwargs): def create(self, **kwargs): params = self.build_params(**kwargs) - + if "model" not in params: + driver = DummyEmbeddingDriver() try: driver = OllamaEmbeddingDriver(**params) return (driver,) diff --git a/nodes/drivers/gtUIOpenAiAudioTranscriptionDriver.py b/nodes/drivers/gtUIOpenAiAudioTranscriptionDriver.py index 78f4491..f48fede 100644 --- a/nodes/drivers/gtUIOpenAiAudioTranscriptionDriver.py +++ b/nodes/drivers/gtUIOpenAiAudioTranscriptionDriver.py @@ -16,8 +16,20 @@ def INPUT_TYPES(s): inputs["optional"].update( { - "audio_transcription_model": (models, {"default": models[0]}), - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY}), + "audio_transcription_model": ( + models, + { + "default": models[0], + "tooltip": "Select the audio transcription model to use.", + }, + ), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY, + "tooltip": "Enter the name of the environment variable that contains the API key, not the API key itself.", + }, + ), }, ) diff --git a/nodes/drivers/gtUIOpenAiChatPromptDriver.py b/nodes/drivers/gtUIOpenAiChatPromptDriver.py index 7ceaf53..9343b85 100644 --- a/nodes/drivers/gtUIOpenAiChatPromptDriver.py +++ b/nodes/drivers/gtUIOpenAiChatPromptDriver.py @@ -29,8 +29,17 @@ def INPUT_TYPES(s): inputs["optional"]["model"] = (models, {"default": models[0]}) inputs["optional"].update( { - "response_format": (["default", "json_object"], {"default": "default"}), - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY}), + "response_format": ( + ["default", "json_object"], + {"default": "default", "tooltip": "Format of the response"}, + ), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY, + "tooltip": "Enter the environment variable name, not the actual API key", + }, + ), } ) diff --git a/nodes/drivers/gtUIOpenAiCompatibleChatPromptDriver.py b/nodes/drivers/gtUIOpenAiCompatibleChatPromptDriver.py index f1456a7..a5c532c 100644 --- a/nodes/drivers/gtUIOpenAiCompatibleChatPromptDriver.py +++ b/nodes/drivers/gtUIOpenAiCompatibleChatPromptDriver.py @@ -12,14 +12,22 @@ class gtUIOpenAiCompatibleChatPromptDriver(gtUIOpenAiChatPromptDriver): def INPUT_TYPES(s): inputs = super().INPUT_TYPES() - # Get the base required and optional inputs - base_required_inputs = inputs["required"] - base_optional_inputs = inputs["optional"] - inputs["optional"].update( { - "model": ("STRING", {"default": default_model}), - "base_url": ("STRING", {"default": default_base_url}), + "model": ( + "STRING", + { + "default": default_model, + "tooltip": "The model to use, e.g., gpt-4o", + }, + ), + "base_url": ( + "STRING", + { + "default": default_base_url, + "tooltip": "The base URL for the OpenAI API", + }, + ), } ) diff --git a/nodes/drivers/gtUIOpenAiCompatibleEmbeddingDriver.py b/nodes/drivers/gtUIOpenAiCompatibleEmbeddingDriver.py index 8ad563c..8c722eb 100644 --- a/nodes/drivers/gtUIOpenAiCompatibleEmbeddingDriver.py +++ b/nodes/drivers/gtUIOpenAiCompatibleEmbeddingDriver.py @@ -18,15 +18,24 @@ def INPUT_TYPES(s): { "embedding_model": ( models, - {"default": models[0]}, + { + "default": models[0], + "tooltip": "Select the embedding model to use.", + }, ), "base_url": ( "STRING", - {"default": default_base_url}, + { + "default": default_base_url, + "tooltip": "Enter the base URL for the API.", + }, ), "api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Enter the environment variable name for the API key, not the actual API key.", + }, ), } ) diff --git a/nodes/drivers/gtUIOpenAiCompatibleImageGenerationDriver.py b/nodes/drivers/gtUIOpenAiCompatibleImageGenerationDriver.py index c98a3a2..48de314 100644 --- a/nodes/drivers/gtUIOpenAiCompatibleImageGenerationDriver.py +++ b/nodes/drivers/gtUIOpenAiCompatibleImageGenerationDriver.py @@ -18,7 +18,13 @@ def INPUT_TYPES(s): inputs = super().INPUT_TYPES() inputs["optional"].update( { - "base_url": ("STRING", {"default": default_base_url}), + "base_url": ( + "STRING", + { + "default": default_base_url, + "tooltip": "The base URL for the OpenAI API", + }, + ), } ) diff --git a/nodes/drivers/gtUIOpenAiEmbeddingDriver.py b/nodes/drivers/gtUIOpenAiEmbeddingDriver.py index c3e6272..8c83a86 100644 --- a/nodes/drivers/gtUIOpenAiEmbeddingDriver.py +++ b/nodes/drivers/gtUIOpenAiEmbeddingDriver.py @@ -14,18 +14,23 @@ class gtUIOpenAiEmbeddingDriver(gtUIBaseEmbeddingDriver): def INPUT_TYPES(s): inputs = super().INPUT_TYPES() - # Get the base required and optional inputs - base_required_inputs = inputs["required"] - base_optional_inputs = inputs["optional"] - inputs["required"].update() inputs["optional"].update( { "embedding_model": ( models, - {"default": models[0]}, + { + "default": models[0], + "tooltip": "Select the embedding model to use.", + }, + ), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY, + "tooltip": "Enter the environment variable name that contains your API key, not the actual API key.", + }, ), - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY}), } ) diff --git a/nodes/drivers/gtUIOpenAiImageGenerationDriver.py b/nodes/drivers/gtUIOpenAiImageGenerationDriver.py index ae927c1..8e7a52b 100644 --- a/nodes/drivers/gtUIOpenAiImageGenerationDriver.py +++ b/nodes/drivers/gtUIOpenAiImageGenerationDriver.py @@ -17,9 +17,24 @@ def INPUT_TYPES(s): inputs = super().INPUT_TYPES() inputs["optional"].update( { - "image_generation_model": (models, {"default": models[0]}), - "size": (sizes, {"default": sizes[2]}), - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY}), + "image_generation_model": ( + models, + { + "default": models[0], + "tooltip": "Select the image generation model.", + }, + ), + "size": ( + sizes, + {"default": sizes[2], "tooltip": "Select the desired image size."}, + ), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY, + "tooltip": "Enter the environment variable name for the API key, not the actual API key.", + }, + ), } ) diff --git a/nodes/drivers/gtUIOpenAiTextToSpeechDriver.py b/nodes/drivers/gtUIOpenAiTextToSpeechDriver.py index e52b5db..fd095d3 100644 --- a/nodes/drivers/gtUIOpenAiTextToSpeechDriver.py +++ b/nodes/drivers/gtUIOpenAiTextToSpeechDriver.py @@ -17,9 +17,27 @@ def INPUT_TYPES(s): inputs["optional"].update( { - "text_to_speech_model": ("STRING", {"default": "tts-1"}), - "voice": (voices, {"default": voices[0]}), - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY}), + "text_to_speech_model": ( + "STRING", + { + "default": "tts-1", + "tooltip": "Enter the text-to-speech model name.", + }, + ), + "voice": ( + voices, + { + "default": voices[0], + "tooltip": "Select the voice for text-to-speech.", + }, + ), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY, + "tooltip": "Enter the environment variable name for the API key, not the actual API key.", + }, + ), } ) return inputs diff --git a/nodes/drivers/gtUIPgVectorVectorStoreDriver.py b/nodes/drivers/gtUIPgVectorVectorStoreDriver.py index 8d0ee7e..971f8bc 100644 --- a/nodes/drivers/gtUIPgVectorVectorStoreDriver.py +++ b/nodes/drivers/gtUIPgVectorVectorStoreDriver.py @@ -21,12 +21,48 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "table_name": ("STRING", {"default": DEFAULT_TABLE_NAME}), - "host_env": ("STRING", {"default": DEFAULT_HOST_ENV}), - "user_env": ("STRING", {"default": DEFAULT_USER_ENV}), - "pass_env": ("STRING", {"default": DEFAULT_PASS_ENV}), - "port_env": ("STRING", {"default": DEFAULT_PORT_ENV}), - "name_env": ("STRING", {"default": DEFAULT_NAME_ENV}), + "table_name": ( + "STRING", + { + "default": DEFAULT_TABLE_NAME, + "tooltip": "Name of the table to store vectors", + }, + ), + "host_env": ( + "STRING", + { + "default": DEFAULT_HOST_ENV, + "tooltip": "Environment variable name for the PostgreSQL host", + }, + ), + "user_env": ( + "STRING", + { + "default": DEFAULT_USER_ENV, + "tooltip": "Environment variable name for the PostgreSQL user", + }, + ), + "pass_env": ( + "STRING", + { + "default": DEFAULT_PASS_ENV, + "tooltip": "Environment variable name for the PostgreSQL password", + }, + ), + "port_env": ( + "STRING", + { + "default": DEFAULT_PORT_ENV, + "tooltip": "Environment variable name for the PostgreSQL port", + }, + ), + "name_env": ( + "STRING", + { + "default": DEFAULT_NAME_ENV, + "tooltip": "Environment variable name for the PostgreSQL database name", + }, + ), } ) diff --git a/nodes/drivers/gtUIPineconeVectorStoreDriver.py b/nodes/drivers/gtUIPineconeVectorStoreDriver.py index dc1dfce..6901a0d 100644 --- a/nodes/drivers/gtUIPineconeVectorStoreDriver.py +++ b/nodes/drivers/gtUIPineconeVectorStoreDriver.py @@ -16,9 +16,27 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "api_key_env_var": ("STRING", {"default": DEFAULT_API_KEY_ENV}), - "environment_env_var": ("STRING", {"default": DEFAULT_ENVIRONMENT_ENV}), - "index_name_env_var": ("STRING", {"default": DEFAULT_INDEX_NAME_ENV}), + "api_key_env_var": ( + "STRING", + { + "default": DEFAULT_API_KEY_ENV, + "tooltip": "Environment variable name for the API key. Do not include the actual API key.", + }, + ), + "environment_env_var": ( + "STRING", + { + "default": DEFAULT_ENVIRONMENT_ENV, + "tooltip": "Environment variable name for the Pinecone environment.", + }, + ), + "index_name_env_var": ( + "STRING", + { + "default": DEFAULT_INDEX_NAME_ENV, + "tooltip": "Environment variable name for the Pinecone index name.", + }, + ), } ) diff --git a/nodes/drivers/gtUIQdrantVectorStoreDriver.py b/nodes/drivers/gtUIQdrantVectorStoreDriver.py index bd546ac..6394dc4 100644 --- a/nodes/drivers/gtUIQdrantVectorStoreDriver.py +++ b/nodes/drivers/gtUIQdrantVectorStoreDriver.py @@ -17,10 +17,34 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "collection_name": ("STRING", {"default": DEFAULT_COLLECTION_NAME}), - "content_payload_key": ("STRING", {"default": DEFAULT_PAYLOAD_KEY}), - "api_key_env": ("STRING", {"default": DEFAULT_API_KEY_ENV}), - "url_env": ("STRING", {"default": DEFAULT_URL_ENV}), + "collection_name": ( + "STRING", + { + "default": DEFAULT_COLLECTION_NAME, + "tooltip": "Name of the Qdrant collection", + }, + ), + "content_payload_key": ( + "STRING", + { + "default": DEFAULT_PAYLOAD_KEY, + "tooltip": "Key for the content payload", + }, + ), + "api_key_env": ( + "STRING", + { + "default": DEFAULT_API_KEY_ENV, + "tooltip": "Environment variable name for the API key (do not include the actual API key)", + }, + ), + "url_env": ( + "STRING", + { + "default": DEFAULT_URL_ENV, + "tooltip": "Environment variable name for the Qdrant cluster endpoint URL", + }, + ), } ) diff --git a/nodes/drivers/gtUIRedisVectorStoreDriver.py b/nodes/drivers/gtUIRedisVectorStoreDriver.py index aadaf1d..dd3b49c 100644 --- a/nodes/drivers/gtUIRedisVectorStoreDriver.py +++ b/nodes/drivers/gtUIRedisVectorStoreDriver.py @@ -17,10 +17,34 @@ def INPUT_TYPES(s): inputs["required"].update() inputs["optional"].update( { - "host_env": ("STRING", {"default": DEFAULT_HOST_ENV}), - "port_env": ("STRING", {"default": DEFAULT_PORT_ENV}), - "password_env": ("STRING", {"default": DEFAULT_PASSWORD_ENV}), - "index_env": ("STRING", {"default": DEFAULT_INDEX_ENV}), + "host_env": ( + "STRING", + { + "default": DEFAULT_HOST_ENV, + "tooltip": "Environment variable name for the Redis host", + }, + ), + "port_env": ( + "STRING", + { + "default": DEFAULT_PORT_ENV, + "tooltip": "Environment variable name for the Redis port", + }, + ), + "password_env": ( + "STRING", + { + "default": DEFAULT_PASSWORD_ENV, + "tooltip": "Environment variable name for the Redis password. Do not include the actual password here.", + }, + ), + "index_env": ( + "STRING", + { + "default": DEFAULT_INDEX_ENV, + "tooltip": "Environment variable name for the Redis index", + }, + ), } ) diff --git a/nodes/drivers/gtUITavilyWebSearchDriver.py b/nodes/drivers/gtUITavilyWebSearchDriver.py index 8725709..8ef31a8 100644 --- a/nodes/drivers/gtUITavilyWebSearchDriver.py +++ b/nodes/drivers/gtUITavilyWebSearchDriver.py @@ -73,7 +73,10 @@ def INPUT_TYPES(s): { "api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "The name of the environment variable that contains the API key. Do not include the actual API key here.", + }, ), } ) diff --git a/nodes/drivers/gtUIVoyageAiEmbeddingDriver.py b/nodes/drivers/gtUIVoyageAiEmbeddingDriver.py index 346a0a2..a2726fe 100644 --- a/nodes/drivers/gtUIVoyageAiEmbeddingDriver.py +++ b/nodes/drivers/gtUIVoyageAiEmbeddingDriver.py @@ -25,17 +25,32 @@ def INPUT_TYPES(s): { "voyage_api_key_env_var": ( "STRING", - {"default": DEFAULT_API_KEY_ENV_VAR}, + { + "default": DEFAULT_API_KEY_ENV_VAR, + "tooltip": "Environment variable name for the Voyage API key (do not include the actual API key)", + }, ), "embedding_model": ( "STRING", - {"default": "voyage-large-2"}, + { + "default": "voyage-large-2", + "tooltip": "The model to use for embedding", + }, ), "input_type": ( "STRING", - {"default": "document"}, + { + "default": "document", + "tooltip": "The type of input to embed (e.g., document, text)", + }, + ), + "ignore_voyage_embedding_driver": ( + "BOOLEAN", + { + "default": False, + "tooltip": "Whether to ignore the Voyage AI Embedding Driver and use a dummy driver instead", + }, ), - "ignore_voyage_embedding_driver": ("BOOLEAN", {"default": False}), } ) diff --git a/pyproject.toml b/pyproject.toml index ce99920..1d13546 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ priority = "explicit" [project] name = "comfyui-griptape" description = "Griptape LLM(Large Language Model) Nodes for ComfyUI." -version = "1.0.10" +version = "1.0.11" license = {file = "LICENSE"} dependencies = ["griptape[all]==0.34.0", "python-dotenv"]