Class FunctionCallExtensions
- Namespace
- GenerativeAI
- Assembly
- GenerativeAI.dll
Provides extension methods for working with function call-related types.
public static class FunctionCallExtensions
- Inheritance
-
FunctionCallExtensions
- Inherited Members
Methods
ToFunctionCallContent(FunctionResponse?)
Converts a nullable FunctionResponse into a Content object configured with the role "user" (as the official SDKs send function results) and containing the response as a single part of the content.
public static Content ToFunctionCallContent(this FunctionResponse? responseContent)
Parameters
responseContentFunctionResponseA nullable FunctionResponse representing the function response to be converted into content.
Returns
- Content
A Content object with the "user" role and a single part containing the provided function response.
ToFunctionCallContent(List<FunctionResponse>)
Converts a nullable FunctionResponse into a Content object configured with the role "user" (as the official SDKs send function results) and containing the provided function responses.
public static Content ToFunctionCallContent(this List<FunctionResponse> responses)
Parameters
responsesList<FunctionResponse>A list of FunctionResponse objects to be converted into content.