Skip to content

LLM_CHAT_COMPLETE outputSchema is validated against inputSchema and fails #1599

Description

@lokudadalla

'LLM_CHAT_COMPLETE' accepts 'outputSchema', but setting it fails with:

Cannot invoke "com.netflix.conductor.common.metadata.SchemaDef.getData()" because "schema" is null

In 'ai/src/main/java/org/conductoross/conductor/ai/LLMHelper.java' line 297-298, the code checks
'getOutputSchema()' but passes 'getInputSchema()' to 'validateJsonSchema.' Lines 258-265 have the
same problem.

Workaround: set 'inputSchema' to the same value as 'outputSchema' Then validation works.

I've pushed a branch with the fix and a regression test: https://github.com/lokudadalla/conductor/tree/fix/llm-output-schema-validation

Happy to open a PR if this approach looks right.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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