Skip to content

Conversation

stellasia
Copy link
Contributor

@stellasia stellasia commented Jan 17, 2025

Description

Small bug fix, where parameter under the 'extras' key were not resolved. Ie this PR allows to write config files like:

{
    "extras": {
        "openai_api_key": {
            "resolver_": "ENV",
            "key_": "MY_OPENAI_KEY"
        }
    },
    "llm_config": {
        "class_": "OpenAILLM",
        "params_": {
            "api_key": {
                "resolver_": "CONFIG_KEY",
                "key_": "extras.openai_api_key"
            }
        }
    },
    "embedder_config": {
        "class_": "OpenAIEmbeddings",
        "params_": {
            "api_key": {
                "resolver_": "CONFIG_KEY",
                "key_": "extras.openai_api_key"
            }
        }
    }
}

Note: this was the intention with the addition of the extras field in config file, but using the wrong type is preventing it to be resolved as intended.

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Documentation update
  • Project configuration change

Complexity

Complexity: Low

How Has This Been Tested?

  • Unit tests
  • E2E tests
  • Manual tests

Checklist

The following requirements should have been met (depending on the changes in the branch):

  • Documentation has been updated
  • Unit tests have been updated
  • E2E tests have been updated
  • Examples have been updated
  • New files have copyright header
  • CLA (https://neo4j.com/developer/cla/) has been signed
  • CHANGELOG.md updated if appropriate

@stellasia stellasia marked this pull request as ready for review January 21, 2025 13:06
@stellasia stellasia requested a review from a team as a code owner January 21, 2025 13:06
@stellasia stellasia merged commit 839be27 into neo4j:main Jan 21, 2025
7 checks passed
@stellasia stellasia deleted the fix/extras branch February 7, 2025 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants