Class GenerateAnswerResponseExtension
- Namespace
- GenerativeAI
- Assembly
- GenerativeAI.dll
Provides extension methods for GenerateAnswerResponse objects.
public static class GenerateAnswerResponseExtension
- Inheritance
-
GenerateAnswerResponseExtension
- Inherited Members
Methods
GetAnswer(GenerateAnswerResponse?)
Extracts the answer text from a GenerateAnswerResponse.
public static string GetAnswer(this GenerateAnswerResponse? response)
Parameters
responseGenerateAnswerResponseThe response to extract the answer from.
Returns
- string
The answer text joined by newlines.
Exceptions
- ArgumentNullException
Thrown when the response or answer is null.