Skip to content

Use credentials for API keys instead of plain text strings #410

@koettert

Description

@koettert

All node that use/require an API key should support a credentials flow variable which can be used via the get_credentials(identifier: str)→ Credential method.

Ideally we wait until the Python framework supports credentials (AP-21962).

The dropdown box for credentials variables can be created like this:

@knext.parameter_group(label="Credentials")
class CredentialsSettings:
    credentials_param = knext.StringParameter(
        label="Credentials parameter",
        description="Credentials parameter name for accessing Google Search API key.",
        choices=lambda a: knext.DialogCreationContext.get_credential_names(a),
    )

For details see the src/agents/base.py of the knime-python-llm repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions