Get desktop application:
View/edit binary Protocol Buffers messages
Remote executor endpoint (the service counterpart of `executor.h`).
Maps to `CreateCall` in `executor.h`.
Maps to `CreateSelection` in `executor.h`.
Maps to `CreateStruct` in `executor.h`.
Maps to `CreateValue` in `executor.h`.
Maps to `Dispose` in `executor.h`.
Maps to `Materialize` in `executor.h`.
A representation of a `let` expression that incrementally defines a list of named values, and then refers to the values within the body of the `result`.
Used in:
One or more named values defined within this block of processing, each associating a label with a value to compute (evaluate) and assign to that label. Unlike in a regular struct, the names of elements in this struct can be referred to by elements defined later, or by the `result in manner simila to how a formal `lambda` parameter can be referred to from within its body. Self-references are prohibited, and all names introduced here must be different. As long as the declaration of any value in the struct precedes its usage, the order of execution among valus that do not refer to one-another can be nondeterministic. It is only the dependencies between the elements that effectively determine the causal relationships that constrain the order of execution.
The result returned by the block (required). The body of the result may contain references to any of the elements in the `local` defined above.
Used in:
A representation of a function call.
Used in:
A value of a functional type that represents the function to call. The type of its formal parameter must match the type of the `argument`.
A value that represents the argument to feed as input to the function specified above. Present if and only if the function declares a formal parameter (i.e., it's not a zero-argument function). This can be a materialized value, or a value represented as a computation that must be evaluated.
Used as request type in: Executor.CreateCall
Used as field type in:
Used as response type in: Executor.CreateCall
Used as field type in:
Used as request type in: Executor.CreateSelection
Used as field type in:
Used as response type in: Executor.CreateSelection
Used as field type in:
Used as request type in: Executor.CreateStruct
Used as field type in:
Used as response type in: Executor.CreateStruct
Used as field type in:
Used as request type in: Executor.CreateValue
Used as field type in:
Used as response type in: Executor.CreateValue
Used as field type in:
Used as request type in: Executor.Dispose
Used as field type in:
Used as response type in: Executor.Dispose
Used as field type in:
(message has no fields)
Represents a functional type.
Used in:
A representation of an intrinsic.
Used in:
The URI that uniquely identifies the intrinsic within the set of operators built into the framework.
An optional static parameter for the intrinsic that is defined as a part of the computation (in contrast to dynamic parameters that are supplied at runtime, potentially as a result of another computation). Similarly to dynamic parameters in function calls, a list of static parameters can be modeled as a struct. Note that intrinsics can, and typically do also accept dynamic parameters (supplied via function calls, as defined above). It is only the types of the dynamic parameters that are reflected in a given intrinsic's functional type signature.
A representation of a lambda expression.
Used in:
The name to use internally within this lambda to refer to the dynamic parameter that will be supplied at invocation time. The parameter is mandatory. The name defined here can be subsequently referenced within the body of the `result`.
A computation that represents the result of applying the lambda to the parameter. The body of the result may contain references to the named formal parameter defined above.
Used as request type in: Executor.Materialize
Used as field type in:
Used as response type in: Executor.Materialize
Used as field type in:
A reference by name (label) to a value defined earlier, either as a lambda parameter, or within a `Block`.
Used in:
Represents a scalar type. NOTE: The ordering of types in this enum is intended to be consistent with TensorFlow's `DType` to facilitate potential future interoperability (but one must no rely on this for correctness, as this property isn't guaranteed to be preserved in future refactoring).
Used in: ,
A representation of a selection from a struct.
Used in:
The source of selection (required).
A specification of which element to select by index.
Represents a type of a sequence (of an unknown number of identically-typed elements).
Used in:
A representation of a structured value; a tuple with a defined numner of elements of abitrary types. Elements can be either materialized values, or values represented as computations that must be evaluated (e.g., such as function calls, selections, etc.).
Used in:
The ordering of the elements is significant, regardless of whether they are named or not, and must be preserved while processing to facilitate selection by index (as defined below).
Represents a composite structure type (potentially nested).
Used in:
Represents a tensor type.
Used in:
Represents a type of a value within a computation (or a computation itself, as a value of a functional type).
Used in: , , ,
A core data structure that represents a value in a generative AI computation in a portable, platform- and language-independent format, either in a fully materialized form (e.g., as a scalar, a struct containing scalars, etc.), or as a computation that must be evaluated to produce such a materialized form (e.g., a function call, a `let` expression, and so on). Values can be of functional types, and functions are modeled as values. The constructs defined below can be arbitrarily nested (e.g., to define nested structures, cascading function calls, functions that accept multiple parameters, functions that take functions as parameters, and so on).
Used in: , , , , , , , ,
CORE COMPOSITIONAL, STRUCTURED, AND FUNCTIONAL CONSTRUCTS FOR FORMING COMPLEX TYPES OF VALUES AND COMPUTATION DEFINITIONS.
An invocation of a given function on a given argument. The function being invoked can be any value of a functional type (e.g., such as a model inference function, a prompt template constructor, an output parser, a safety checker, or a lambda expression explicitly defined in this proto, etc.) as long as its type signature matches the type of the argument passed as input. The value represented by such computation is the result returned by the function being called.
A lambda expression that defines a function that takes a single formal parameter, and produces a single result. Either the parameter or the result (or both) can be structs, function, etc. Lambdas can be nested.
A reference to a name defined in a surrounding context, such as the formal parameter that represents an input to a lambda expression. The value of the reference is the value of the object it refers to (e.g., the formal argument to a function call supplied at runtime).
A tuple that consists of orderded, and optionally named, values. Structs are used, e.g., to assemble multiple values to form a complex argument to a function call, or to represent a complex result. They can be arbitrarily nested to model complex data structures.
A selection of an element from a struct. Selections are used, e.g., to extract a part of a result of one computation to feed as a part of an argument to a subsequent computation.
A `let` expression; a block of computation logic that consists of a series of assignments, followed by a computation that utilizes them to produce the final result. The named values produced by the assignments can appear either in the final result, and/or in assignments further down the list. This is the only compositional construct that is technically functionally redundant (equivalent to a nested lambda expression), but that serves a role in simplifying processing and improving debuggability.
An intrinsic. Intrinsics are functions with well-defined semantics that are supported by the framework, natively understood by the reference set of runtime components, and used to support the core functionality, including interoperability with popular types of frontend SDKs, model cascading and other types of hybrid computing patterns, etc. Intrinsics range from simple transformations on data (e.g., a prompt template, an output parser, or a model inference function) to operators that accept functions as arguments (e.g., conditionals, loops, fallback, and other control flow or higher-level functional operators). The intrinsic system is modular; different deployments can offer a custom sets of intrinsics of any type, and user-defined intrinsics are supported in the same way as those that come with the framework by default.
The preferred representation for string values.
The preferred representation for Boolean values.
The preferred representation for int numeric values.
The preferred representation for float numeric values.
The preferred representation for media values, e.g. image/audio.
A serialized tensor content as an instance of `tensorflow.TensorProto`, as defined in `tensorflow/core/framework/tensor.proto`. This is currently the only way to pass in numeric or string values, including simple scalars. NOTE: This must be `Any` in order to avoid a dependency on TensorFlow.
genc:google3-begin(internal)
genc:google3-end
The type of this value (currently optional; eventually required where it cannot be automatically inferred from the context).
The label of the value, these labels are mostly for human readability and for debugging purposes, and are typically ignored by the runtime. One exception is prompt template processor, where labels can be used to define keyword arguments that could be reused in the template.
Mime type of the data. See https://www.iana.org/assignments/media-types/media-types.xhtml for the full list. Commonly used types that our models are expected to understand: text/plain: Generic text, e.g. user's input for an LLM. text/*: Models should default to treating any text/ type as text/plain if they don't have a custom handler for it. image/webp: Prefer webp format for encoding images. Programming/markup languages. Use the following types to emphasize that the text is a program in a certain language or should be rendered in a particular way. Models should default to ingesting these as text if they don't have custom handlers for them. text/x-python: Python application/x-latex: LaTEX text/markdown: Markdown mimetype should be used altogether with `str` or `media` to provide additonal context for these types.
A reference to a value that lives in the executor.
Used in: , , , , , , , ,