SwiftstructTokenGenerationCore

struct TokenGenerationCore.Grammar

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

Members 24

  1. funcstatic anyText(thoughtBudget: PromptKit.ThoughtBudget, version: TokenGenerationCore.PromptPreprocessingTemplateVersion?) throws -> TokenGenerationCore.Grammar
  2. funcstatic appendingUnusedThoughtRules(to: TokenGenerationCore.Grammar, version: TokenGenerationCore.PromptPreprocessingTemplateVersion) -> TokenGenerationCore.Grammar
  3. funcstatic combiningWithAlternation(TokenGenerationCore.Grammar, TokenGenerationCore.Grammar) throws -> TokenGenerationCore.Grammar
  4. funcstatic combiningWithMixedResponse(toolGrammar: TokenGenerationCore.Grammar, outputGrammar: TokenGenerationCore.Grammar) throws -> TokenGenerationCore.Grammar
  5. funcstatic freeformText() throws -> TokenGenerationCore.Grammar
  6. funcstatic parsedRules(backusNaurForm: String) throws -> [TokenGenerationCore.Rule]
  7. funcstatic prependingThoughtGrammar(to: TokenGenerationCore.Grammar, version: TokenGenerationCore.PromptPreprocessingTemplateVersion) -> TokenGenerationCore.Grammar
  8. funcstatic regexRules(pattern: String, wrapInQuotes: Bool) throws -> [TokenGenerationCore.Rule]
  9. fieldlet cacheableResursiveNonTerminals: [String]+0x0
  10. fieldlet characterSetsUsedInGrammar: [Foundation.CharacterSet]+0x28
  11. fieldlet root: TokenGenerationCore.Rule+0x8
  12. fieldlet rules: [TokenGenerationCore.Rule]+0x20
  13. funcprefixingRules(with: String) throws -> TokenGenerationCore.Grammar
  14. initinit(backusNaurForm: String, prependSpaceToRootRule: Bool, cacheableResursiveNonTerminals: [String], allowSpecialTokensIDTerminals: Bool) throws -> TokenGenerationCore.Grammar
  15. initinit(backusNaurForm: String, prependSpaceToRootRule: Bool) throws -> TokenGenerationCore.Grammar
  16. initinit(toolsDefinitions: [GenerativeFunctionsFoundation.ToolDefinition], version: TokenGenerationCore.PromptPreprocessingTemplateVersion) throws -> TokenGenerationCore.Grammar
  17. initinit(rules: [TokenGenerationCore.Rule], prependSpaceToRootRule: Bool, cacheableResursiveNonTerminals: [String]) throws -> TokenGenerationCore.Grammar
  18. initinit(rules: [TokenGenerationCore.Rule], prependSpaceToRootRule: Bool) throws -> TokenGenerationCore.Grammar
  19. initinit(tools: [GenerativeFunctionsFoundation.Tool.Function], version: TokenGenerationCore.PromptPreprocessingTemplateVersion) throws -> TokenGenerationCore.Grammar
  20. initinit(schema: GenerativeFunctionsFoundation.Schema) -> TokenGenerationCore.Grammar
  21. initinit(_: GenerativeFunctionsFoundation.Schema, jsonObjectFormat: TokenGenerationCore.JSONObjectFormat) throws -> TokenGenerationCore.Grammar
  22. initinit(_: GenerativeFunctionsFoundation.Schema, compact: Bool) throws -> TokenGenerationCore.Grammar
  23. initinit(GenerativeFunctionsFoundation.Schema) throws -> TokenGenerationCore.Grammar
  24. varvar description: String { get }
struct Grammar {
    let cacheableResursiveNonTerminals: [Swift.String]
    let root: TokenGenerationCore.Rule
    let rules: [TokenGenerationCore.Rule]
    let characterSetsUsedInGrammar: [Foundation.CharacterSet]

    init(backusNaurForm: Swift.String, prependSpaceToRootRule: Swift.Bool, cacheableResursiveNonTerminals: [Swift.String], allowSpecialTokensIDTerminals: Swift.Bool) throws
    init(backusNaurForm: Swift.String, prependSpaceToRootRule: Swift.Bool) throws
    init(toolsDefinitions: [GenerativeFunctionsFoundation.ToolDefinition], version: TokenGenerationCore.PromptPreprocessingTemplateVersion) throws
    init(rules: [TokenGenerationCore.Rule], prependSpaceToRootRule: Swift.Bool, cacheableResursiveNonTerminals: [Swift.String]) throws
    init(rules: [TokenGenerationCore.Rule], prependSpaceToRootRule: Swift.Bool) throws
    init(tools: [GenerativeFunctionsFoundation.Tool.Function], version: TokenGenerationCore.PromptPreprocessingTemplateVersion) throws
    init(schema: GenerativeFunctionsFoundation.Schema)
    init(_: GenerativeFunctionsFoundation.Schema, jsonObjectFormat: TokenGenerationCore.JSONObjectFormat) throws
    init(_: GenerativeFunctionsFoundation.Schema, compact: Swift.Bool) throws
    init(_: GenerativeFunctionsFoundation.Schema) throws

    var description: Swift.String {
        get
    }

    func prefixingRules(with: Swift.String) throws -> TokenGenerationCore.Grammar

    static func prependingThoughtGrammar(to: TokenGenerationCore.Grammar, version: TokenGenerationCore.PromptPreprocessingTemplateVersion) -> TokenGenerationCore.Grammar
    static func regexRules(pattern: Swift.String, wrapInQuotes: Swift.Bool) throws -> [TokenGenerationCore.Rule]
    static func parsedRules(backusNaurForm: Swift.String) throws -> [TokenGenerationCore.Rule]
    static func freeformText() throws -> TokenGenerationCore.Grammar
    static func combiningWithAlternation(_: TokenGenerationCore.Grammar, _: TokenGenerationCore.Grammar) throws -> TokenGenerationCore.Grammar
    static func combiningWithMixedResponse(toolGrammar: TokenGenerationCore.Grammar, outputGrammar: TokenGenerationCore.Grammar) throws -> TokenGenerationCore.Grammar
    static func appendingUnusedThoughtRules(to: TokenGenerationCore.Grammar, version: TokenGenerationCore.PromptPreprocessingTemplateVersion) -> TokenGenerationCore.Grammar
    static func anyText(thoughtBudget: PromptKit.ThoughtBudget, version: TokenGenerationCore.PromptPreprocessingTemplateVersion?) throws -> TokenGenerationCore.Grammar
}