API Reference
Classes
AmazonBedrockSupportedModels
Initializers
using Xpander.AI.Sdk;
new AmazonBedrockSupportedModels();
Constants
Name | Type | Description |
---|---|---|
AnthropicClaude35Sonnet20240620 |
string |
No description. |
AnthropicClaude3Haiku20240307 |
string |
No description. |
CohereCommandR |
string |
No description. |
CohereCommandRPlus |
string |
No description. |
MetaLlama31405bInstruct |
string |
No description. |
MetaLlama3170bInstruct |
string |
No description. |
MetaLlama318bInstruct |
string |
No description. |
MistralMistralLarge2402 |
string |
No description. |
MistralMistralLarge2407 |
string |
No description. |
MistralMistralSmall2402 |
string |
No description. |
AnthropicClaude35Sonnet20240620
Required
public string AnthropicClaude35Sonnet20240620 { get; }
- Type: string
AnthropicClaude3Haiku20240307
Required
public string AnthropicClaude3Haiku20240307 { get; }
- Type: string
CohereCommandR
Required
public string CohereCommandR { get; }
- Type: string
CohereCommandRPlus
Required
public string CohereCommandRPlus { get; }
- Type: string
MetaLlama31405bInstruct
Required
public string MetaLlama31405bInstruct { get; }
- Type: string
MetaLlama3170bInstruct
Required
public string MetaLlama3170bInstruct { get; }
- Type: string
MetaLlama318bInstruct
Required
public string MetaLlama318bInstruct { get; }
- Type: string
MistralMistralLarge2402
Required
public string MistralMistralLarge2402 { get; }
- Type: string
MistralMistralLarge2407
Required
public string MistralMistralLarge2407 { get; }
- Type: string
MistralMistralSmall2402
Required
public string MistralMistralSmall2402 { get; }
- Type: string
NvidiaNIMSupportedModels
Initializers
using Xpander.AI.Sdk;
new NvidiaNIMSupportedModels();
Constants
Name | Type | Description |
---|---|---|
Llama3170bInstruct |
string |
No description. |
Llama3170bInstruct
Required
public string Llama3170bInstruct { get; }
- Type: string
OpenAISupportedModels
Initializers
using Xpander.AI.Sdk;
new OpenAISupportedModels();
Constants
Name | Type | Description |
---|---|---|
Gpt4 |
string |
No description. |
Gpt4O |
string |
No description. |
Gpt4OMini |
string |
No description. |
Gpt4
Required
public string Gpt4 { get; }
- Type: string
Gpt4O
Required
public string Gpt4O { get; }
- Type: string
Gpt4OMini
Required
public string Gpt4OMini { get; }
- Type: string
ToolResponse
- Implements: IToolResponse
Initializers
using Xpander.AI.Sdk;
new ToolResponse(string ToolCallId, string Role, string Name, string ResponseMessage, Newtonsoft.Json.Linq.JObject FilteredTool, string PayloadRequest, object LocalTool = null);
Name | Type | Description |
---|---|---|
ToolCallId |
string |
- The ID of the tool call. |
Role |
string |
- The role in the response. |
Name |
string |
- The name of the tool. |
ResponseMessage |
string |
- The response message from the tool. |
FilteredTool |
Newtonsoft.Json.Linq.JObject |
- The filtered tool object. |
PayloadRequest |
string |
- The request payload that sent to tool. |
LocalTool |
object |
No description. |
ToolCallId
Required
- Type: string
The ID of the tool call.
Role
Required
- Type: string
The role in the response.
Name
Required
- Type: string
The name of the tool.
ResponseMessage
Required
- Type: string
The response message from the tool.
FilteredTool
Required
- Type: Newtonsoft.Json.Linq.JObject
The filtered tool object.
PayloadRequest
Required
- Type: string
The request payload that sent to tool.
LocalTool
Optional
- Type: object
Methods
Name | Description |
---|---|
ToJSON |
Converts the ToolResponse instance to a JSON object. |
ToJSON
private Newtonsoft.Json.Linq.JObject ToJSON()
Converts the ToolResponse instance to a JSON object.
Static Functions
Name | Description |
---|---|
FromJSON |
Creates a ToolResponse instance from a JSON object. |
FromJSON
using Xpander.AI.Sdk;
ToolResponse.FromJSON(object Json);
Creates a ToolResponse instance from a JSON object.
Json
Required
- Type: object
The JSON object to create the instance from.
Properties
Name | Type | Description |
---|---|---|
RawResponse |
object |
Gets the response message. |
FilteredTool |
Newtonsoft.Json.Linq.JObject |
The filtered tool object. |
Name |
string |
The name of the tool. |
PayloadRequest |
string |
The request payload that sent to tool. |
ResponseMessage |
string |
The response message from the tool. |
Role |
string |
The role in the response. |
ToolCallId |
string |
The ID of the tool call. |
LocalTool |
object |
No description. |
RawResponse
Required
public object RawResponse { get; }
- Type: object
Gets the response message.
FilteredTool
Required
public Newtonsoft.Json.Linq.JObject FilteredTool { get; }
- Type: Newtonsoft.Json.Linq.JObject
The filtered tool object.
Name
Required
public string Name { get; }
- Type: string
The name of the tool.
PayloadRequest
Required
public string PayloadRequest { get; }
- Type: string
The request payload that sent to tool.
ResponseMessage
Required
public string ResponseMessage { get; }
- Type: string
The response message from the tool.
Role
Required
public string Role { get; }
- Type: string
The role in the response.
ToolCallId
Required
public string ToolCallId { get; }
- Type: string
The ID of the tool call.
LocalTool
Optional
public object LocalTool { get; }
- Type: object
XpanderClient
Class representing the Xpander client.
Initializers
using Xpander.AI.Sdk;
new XpanderClient(string AgentKey, string AgentUrl, LLMProvider LlmProvider, ILocalTool[] LocalTools = null);
Name | Type | Description |
---|---|---|
AgentKey |
string |
- The API key for the agent. |
AgentUrl |
string |
- The URL for the agent. |
LlmProvider |
LLMProvider |
- The LLM provider to use. |
LocalTools |
ILocalTool[] |
No description. |
AgentKey
Required
- Type: string
The API key for the agent.
AgentUrl
Required
- Type: string
The URL for the agent.
LlmProvider
Required
- Type: LLMProvider
The LLM provider to use.
LocalTools
Optional
- Type: ILocalTool[]
Methods
Name | Description |
---|---|
AddLocalTools |
No description. |
LoadXpanderTools |
Loads the tools available from the Xpander agent. |
Tools |
Retrieves the tools for the current or specified LLM provider. |
XpanderSingleToolInvoke |
Invokes a single tool with the given tool ID and payload. |
XpanderToolCall |
Invokes the tools based on the tool selector response. |
AddLocalTools
private void AddLocalTools(ILocalTool[] Tools)
Tools
Required
- Type: ILocalTool[]
LoadXpanderTools
private object[] LoadXpanderTools()
Loads the tools available from the Xpander agent.
Tools
private object Tools(LLMProvider LlmProvider = null)
Retrieves the tools for the current or specified LLM provider.
LlmProvider
Optional
- Type: LLMProvider
(Optional) The LLM provider to use.
XpanderSingleToolInvoke
private string XpanderSingleToolInvoke(string ToolId, object Payload = null)
Invokes a single tool with the given tool ID and payload.
ToolId
Required
- Type: string
The ID of the tool to invoke.
Payload
Optional
- Type: object
The payload to pass to the tool.
XpanderToolCall
private ToolResponse[] XpanderToolCall(object ToolSelectorResponse, string LlmProvider = null)
Invokes the tools based on the tool selector response.
ToolSelectorResponse
Required
- Type: object
The response from the tool selector.
LlmProvider
Optional
- Type: string
(Optional) The LLM provider to use.
Properties
Name | Type | Description |
---|---|---|
ValidProviders |
string[] |
Provides a list of valid LLM providers. |
ToolsNamesMapping |
System.Collections.Generic.IDictionary |
Retrieves the tool names mapping for the current LLM provider. |
AgentKey |
string |
No description. |
AgentUrl |
string |
No description. |
LocalTools |
ILocalTool[] |
No description. |
ToolsCache |
object |
No description. |
ValidProviders
Required
public string[] ValidProviders { get; }
- Type: string[]
Provides a list of valid LLM providers.
ToolsNamesMapping
Required
public System.Collections.Generic.IDictionary<string, string> ToolsNamesMapping { get; }
- Type: System.Collections.Generic.IDictionary
Retrieves the tool names mapping for the current LLM provider.
AgentKey
Required
public string AgentKey { get; }
- Type: string
AgentUrl
Required
public string AgentUrl { get; }
- Type: string
LocalTools
Required
public ILocalTool[] LocalTools { get; }
- Type: ILocalTool[]
ToolsCache
Required
public object ToolsCache { get; }
- Type: object
Protocols
IBedrockTool
- Implemented By: IBedrockTool
Interface representing a Bedrock tool.
Properties
Name | Type | Description |
---|---|---|
ToolSpec |
IBedrockToolSpec |
The tool specification of the Bedrock tool. |
Execute |
object |
Function to execute the Bedrock tool. |
ToolSpec
Required
public IBedrockToolSpec ToolSpec { get; set; }
- Type: IBedrockToolSpec
The tool specification of the Bedrock tool.
Execute
Optional
public object Execute { get; set; }
- Type: object
Function to execute the Bedrock tool.
IBedrockToolOutput
- Implemented By: IBedrockToolOutput
Properties
Name | Type | Description |
---|---|---|
ToolSpec |
IBedrockToolSpec |
The tool specification of the Bedrock tool. |
Execute |
object |
Function to execute the Bedrock tool. |
ToolSpec
Required
public IBedrockToolSpec ToolSpec { get; }
- Type: IBedrockToolSpec
The tool specification of the Bedrock tool.
Execute
Optional
public object Execute { get; }
- Type: object
Function to execute the Bedrock tool.
IBedrockToolSpec
- Implemented By: IBedrockToolSpec
Interface representing a Bedrock tool specification.
Properties
Name | Type | Description |
---|---|---|
Description |
string |
The description of the Bedrock tool. |
InputSchema |
IBedrockToolSpecInputSchema |
Input schema of the Bedrock tool. |
Name |
string |
The name of the Bedrock tool. |
Description
Required
public string Description { get; set; }
- Type: string
The description of the Bedrock tool.
InputSchema
Required
public IBedrockToolSpecInputSchema InputSchema { get; set; }
Input schema of the Bedrock tool.
Name
Required
public string Name { get; set; }
- Type: string
The name of the Bedrock tool.
IBedrockToolSpecInputSchema
- Implemented By: IBedrockToolSpecInputSchema
Interface representing the input schema for a Bedrock tool specification.
Properties
Name | Type | Description |
---|---|---|
Json |
System.Collections.Generic.IDictionary |
JSON schema of the tool parameters. |
Json
Required
public System.Collections.Generic.IDictionary<string, IToolParameter> Json { get; set; }
- Type: System.Collections.Generic.IDictionary
IToolParameter>
JSON schema of the tool parameters.
ILLMProviderHandler
- Implemented By: ILLMProviderHandler
Interface representing a LLM (Large Language Model) provider handler.
Methods
Name | Description |
---|---|
GetTools |
Retrieves tools. |
InvokeTools |
Invokes tools based on the tool selector response. |
SingleToolInvoke |
Invokes a single tool with the provided payload. |
GetTools
private object[] GetTools(bool Functionize = null)
Retrieves tools.
Functionize
Optional
- Type: bool
Whether to functionize the tools.
InvokeTools
private object InvokeTools(object ToolSelectorResponse)
Invokes tools based on the tool selector response.
ToolSelectorResponse
Required
- Type: object
The response from the tool selector.
SingleToolInvoke
private string SingleToolInvoke(string ToolId, object Payload)
Invokes a single tool with the provided payload.
ToolId
Required
- Type: string
The ID of the tool to invoke.
Payload
Required
- Type: object
The payload to send to the tool.
Properties
Name | Type | Description |
---|---|---|
ToolsNamesMapping |
System.Collections.Generic.IDictionary |
Mapping of tool names. |
ToolsNamesMapping
Optional
public System.Collections.Generic.IDictionary<string, string> ToolsNamesMapping { get; set; }
- Type: System.Collections.Generic.IDictionary
Mapping of tool names.
ILocalTool
- Implemented By: ILocalTool
Properties
Name | Type | Description |
---|---|---|
Function |
ILocalToolFunction |
No description. |
Type |
string |
No description. |
Function
Required
public ILocalToolFunction Function { get; }
- Type: ILocalToolFunction
Type
Required
public string Type { get; }
- Type: string
ILocalToolFunction
- Implemented By: ILocalToolFunction
Properties
Name | Type | Description |
---|---|---|
Description |
string |
No description. |
Name |
string |
No description. |
Parameters |
object |
No description. |
Description
Required
public string Description { get; }
- Type: string
Name
Required
public string Name { get; }
- Type: string
Parameters
Required
public object Parameters { get; }
- Type: object
IMessage
- Implemented By: IMessage
Interface representing a message.
Properties
Name | Type | Description |
---|---|---|
Content |
string |
The content of the message. |
Role |
string |
The role of the message sender. |
Content
Required
public string Content { get; set; }
- Type: string
The content of the message.
Role
Required
public string Role { get; set; }
- Type: string
The role of the message sender.
IOpenAIToolFunctionOutput
- Implemented By: IOpenAIToolFunctionOutput
Properties
Name | Type | Description |
---|---|---|
Description |
string |
The description of the tool. |
Name |
string |
The name of the tool. |
Execute |
object |
Function to execute the Bedrock tool. |
Func |
object |
Function to execute the tool. |
Parameters |
IToolParameter |
Parameters of the tool. |
Description
Required
public string Description { get; }
- Type: string
The description of the tool.
Name
Required
public string Name { get; }
- Type: string
The name of the tool.
Execute
Optional
public object Execute { get; }
- Type: object
Function to execute the Bedrock tool.
Func
Optional
public object Func { get; }
- Type: object
Function to execute the tool.
Parameters
Optional
public IToolParameter Parameters { get; }
- Type: IToolParameter
Parameters of the tool.
IOpenAIToolOutput
- Implemented By: IOpenAIToolOutput
Properties
Name | Type | Description |
---|---|---|
Function |
IOpenAIToolFunctionOutput |
No description. |
Type |
string |
No description. |
Function
Required
public IOpenAIToolFunctionOutput Function { get; }
Type
Required
public string Type { get; }
- Type: string
ITool
- Implemented By: ITool
Interface representing a tool.
Properties
Name | Type | Description |
---|---|---|
Description |
string |
The description of the tool. |
Name |
string |
The name of the tool. |
Func |
object |
Function to execute the tool. |
Parameters |
System.Collections.Generic.IDictionary |
Parameters of the tool. |
Description
Required
public string Description { get; set; }
- Type: string
The description of the tool.
Name
Required
public string Name { get; set; }
- Type: string
The name of the tool.
Func
Optional
public object Func { get; set; }
- Type: object
Function to execute the tool.
Parameters
Optional
public System.Collections.Generic.IDictionary<string, IToolParameter> Parameters { get; set; }
- Type: System.Collections.Generic.IDictionary
IToolParameter>
Parameters of the tool.
IToolParameter
- Implemented By: IToolParameter
Interface representing a tool parameter.
Properties
Name | Type | Description |
---|---|---|
Properties |
System.Collections.Generic.IDictionary |
Properties of the parameter. |
Type |
string |
The type of the parameter. |
Required |
string[] |
List of required properties. |
Properties
Required
public System.Collections.Generic.IDictionary<string, IToolParameter> Properties { get; set; }
- Type: System.Collections.Generic.IDictionary
IToolParameter>
Properties of the parameter.
Type
Required
public string Type { get; set; }
- Type: string
The type of the parameter.
Required
Optional
public string[] Required { get; set; }
- Type: string[]
List of required properties.
IToolResponse
- Implemented By: ToolResponse, IToolResponse
Properties
Name | Type | Description |
---|---|---|
FilteredTool |
Newtonsoft.Json.Linq.JObject |
The filtered tool object. |
Name |
string |
The name of the tool. |
PayloadRequest |
string |
The request payload that sent to tool. |
ResponseMessage |
string |
The response message from the tool. |
Role |
string |
The role in the response. |
ToolCallId |
string |
The ID of the tool call. |
FilteredTool
Required
public Newtonsoft.Json.Linq.JObject FilteredTool { get; set; }
- Type: Newtonsoft.Json.Linq.JObject
The filtered tool object.
Name
Required
public string Name { get; set; }
- Type: string
The name of the tool.
PayloadRequest
Required
public string PayloadRequest { get; set; }
- Type: string
The request payload that sent to tool.
ResponseMessage
Required
public string ResponseMessage { get; set; }
- Type: string
The response message from the tool.
Role
Required
public string Role { get; set; }
- Type: string
The role in the response.
ToolCallId
Required
public string ToolCallId { get; set; }
- Type: string
The ID of the tool call.
IToolResponsePayload
- Implemented By: IToolResponsePayload
Properties
Name | Type | Description |
---|---|---|
Property1 |
string |
A string property for the tool response payload. |
Property2 |
double |
A numeric property for the tool response payload. |
Property1
Required
public string Property1 { get; set; }
- Type: string
A string property for the tool response payload.
Property2
Required
public double Property2 { get; set; }
- Type: double
A numeric property for the tool response payload.
Enums
LLMProvider
Enum representing different Large Language Model (LLM) providers.
Members
Name | Description |
---|---|
LANG_CHAIN |
Represents the 'langchain' provider. |
OPEN_AI |
Represents the 'openai' provider. |
NVIDIA_NIM |
Represents the 'nvidiaNim' provider. |
AMAZON_BEDROCK |
Represents the 'amazonBedrock' provider. |
LANG_CHAIN
Represents the 'langchain' provider.
OPEN_AI
Represents the 'openai' provider.
NVIDIA_NIM
Represents the 'nvidiaNim' provider.
AMAZON_BEDROCK
Represents the 'amazonBedrock' provider.