OpenResponsesExtension
Namespace: Vercel.AI.OpenResponses
public sealed class OpenResponsesExtensionOne Open Responses extension. Tool, item, and event capabilities are registered independently.
Inheritance: object
Properties
Section titled “Properties”DecodeEvent
Section titled “DecodeEvent”public Func<OpenResponsesDecodeEventContext, IReadOnlyList<LanguageModelStreamPart>?>? DecodeEvent { get; set; }Decodes a streaming event into stream parts. Present or absent together with EventTypes.
Value: Func<OpenResponsesDecodeEventContext, IReadOnlyList<LanguageModelStreamPart>>
DecodeItem
Section titled “DecodeItem”public Func<OpenResponsesDecodeItemContext, IReadOnlyList<GeneratedContent>?>? DecodeItem { get; set; }Decodes a completed item into content parts. The model adds a open-responses.extension-replay custom part holding the original item. Present or absent together with ItemTypes.
Value: Func<OpenResponsesDecodeItemContext, IReadOnlyList<GeneratedContent>>
EncodeInputItem
Section titled “EncodeInputItem”public Func<OpenResponsesEncodeInputItemContext, IReadOnlyList<JsonObject>?>? EncodeInputItem { get; set; }Encodes a history part when no original wire item is available. Every returned item must use one of ItemTypes. Requires an item decoder.
Value: Func<OpenResponsesEncodeInputItemContext, IReadOnlyList<JsonObject>>
EncodeTool
Section titled “EncodeTool”public Func<OpenResponsesToolContext, JsonObject?>? EncodeTool { get; set; }Encodes a provider tool. Return null when its arguments cannot be encoded. The model adds ToolType and omits a tool choice that selects the omitted tool. Present or absent together with ToolType.
Value: Func<OpenResponsesToolContext, JsonObject>
EncodeToolChoice
Section titled “EncodeToolChoice”public Func<OpenResponsesToolContext, JsonObject?>? EncodeToolChoice { get; set; }Encodes a specific tool choice. The model adds ToolType. The default is an object holding only ToolType. Requires a tool encoder.
Value: Func<OpenResponsesToolContext, JsonObject>
EventTypes
Section titled “EventTypes”public IReadOnlyList<string>? EventTypes { get; set; }Namespaced event types. Required together with DecodeEvent.
Value: IReadOnlyList<string>
public string Id { get; set; }Extension id in implementor.extension form.
Value: string
ItemTypes
Section titled “ItemTypes”public IReadOnlyList<string>? ItemTypes { get; set; }Namespaced item types. Required together with DecodeItem.
Value: IReadOnlyList<string>
ToolType
Section titled “ToolType”public string? ToolType { get; set; }Namespaced tool type. Required together with EncodeTool.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product