Skip to content

Custom runtime defined Enums #289

Answered by StephenHodgson
Bodekaer asked this question in Q&A
Discussion options

You must be logged in to vote

You could pass json string directly.

var mathSchema = new JsonSchema("math_response", @"
{
  ""type"": ""object"",
  ""properties"": {
    ""steps"": {
      ""type"": ""array"",
      ""items"": {
        ""type"": ""object"",
        ""properties"": {
          ""explanation"": {
            ""type"": ""string""
          },
          ""output"": {
            ""type"": ""string""
          }
        },
        ""required"": [
          ""explanation"",
          ""output""
        ],
        ""additionalProperties"": false
      }
    },
    ""final_answer"": {
      ""type"": ""string""
    }
  },
  ""required"": [
    ""steps"",
    ""final_answer""
  ],
  ""additionalProperties"": f…

Replies: 4 comments 33 replies

Comment options

You must be logged in to vote
18 replies
@Bodekaer
Comment options

@StephenHodgson
Comment options

@StephenHodgson
Comment options

@Bodekaer
Comment options

@StephenHodgson
Comment options

Answer selected by Bodekaer
Comment options

You must be logged in to vote
4 replies
@StephenHodgson
Comment options

@StephenHodgson
Comment options

@Bodekaer
Comment options

@StephenHodgson
Comment options

Comment options

You must be logged in to vote
10 replies
@Bodekaer
Comment options

@StephenHodgson
Comment options

@Bodekaer
Comment options

@StephenHodgson
Comment options

@Bodekaer
Comment options

Comment options

You must be logged in to vote
1 reply
@StephenHodgson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants