Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guided decoding to TGIS gRPC API #31

Merged
merged 1 commit into from
May 30, 2024
Merged

Add guided decoding to TGIS gRPC API #31

merged 1 commit into from
May 30, 2024

Commits on May 22, 2024

  1. Add guided decoding to TGIS gRPC API

      enum ResponseFormat {
        // Plain text, no constraints
        TEXT = 0;
        // Valid json
        JSON = 1;
      }
    
      message StringChoices {
        repeated string choices = 1;
      }
    
      // Mutually-exclusive guided decoding options
      oneof guided {
        // Output will be in the specified format
        ResponseFormat format = 3;
        // Output will follow the provided JSON schema
        string json_schema = 4;
        // Output will follow the provided regex pattern
        string regex = 5;
        // Output will be exactly one of the specified choices
        StringChoices choice = 6;
        // Output will follow the provided context free grammar
        string grammar = 7;
      }
    
    Signed-off-by: Nick Hill <[email protected]>
    njhill committed May 22, 2024
    Configuration menu
    Copy the full SHA
    2e49d28 View commit details
    Browse the repository at this point in the history