Table of Contents

Class CompletionResponse

Namespace
FoundationaLLM.Common.Models.Orchestration.Response
Assembly
FoundationaLLM.Common.dll

Response from a language model.

public class CompletionResponse : CompletionResponseBase
Inheritance
CompletionResponse
Inherited Members
Extension Methods

Constructors

CompletionResponse()

Initialize a completion response.

public CompletionResponse()

CompletionResponse(string, string, string, int, int, float[]?)

Initialize a completion response

public CompletionResponse(string operationId, string completion, string userPrompt, int userPromptTokens, int responseTokens, float[]? userPromptEmbedding)

Parameters

operationId string

The operation id of the completion request.

completion string

The completion response from the language model.

userPrompt string

The user prompt the language model responded to.

userPromptTokens int

The number of tokens in the prompt.

responseTokens int

The number of tokens in the completion.

userPromptEmbedding float[]

User prompt embedding.

Properties

UserPromptEmbedding

User prompt embedding.

[JsonPropertyName("user_prompt_embedding")]
public float[]? UserPromptEmbedding { get; set; }

Property Value

float[]

Methods

FromJSONDocument(JsonDocument)

Returns a CompletionResponse object from a JSON document.

public static CompletionResponse? FromJSONDocument(JsonDocument json)

Parameters

json JsonDocument

The JSON document to deserialize.

Returns

CompletionResponse