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
stringThe operation id of the completion request.
completion
stringThe completion response from the language model.
userPrompt
stringThe user prompt the language model responded to.
userPromptTokens
intThe number of tokens in the prompt.
responseTokens
intThe 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
JsonDocumentThe JSON document to deserialize.