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
operationIdstringThe operation id of the completion request.
completionstringThe completion response from the language model.
userPromptstringThe user prompt the language model responded to.
userPromptTokensintThe number of tokens in the prompt.
responseTokensintThe number of tokens in the completion.
userPromptEmbeddingfloat[]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
jsonJsonDocumentThe JSON document to deserialize.