HypernodesClient 1.0.0
See the version list below for details.
dotnet add package HypernodesClient --version 1.0.0
NuGet\Install-Package HypernodesClient -Version 1.0.0
<PackageReference Include="HypernodesClient" Version="1.0.0" />
paket add HypernodesClient --version 1.0.0
#r "nuget: HypernodesClient, 1.0.0"
// Install HypernodesClient as a Cake Addin #addin nuget:?package=HypernodesClient&version=1.0.0 // Install HypernodesClient as a Cake Tool #tool nuget:?package=HypernodesClient&version=1.0.0
HypernodesCSharpClient
Hyperthetical Client Library
A client library for interacting with the Hyperthetical API, allowing users to communicate with various graphs, manage client functions, and handle user interactions seamlessly.
Table of Contents
Installation
Before you can use the Hyperthetical library, you need to install it. Add the NuGet package to your project:
# Use the following command to install the package
dotnet add package HypernodesClient
Quick Start
// Initialize the client with your funding key
var client = new Hyperthetical.Client("YOUR_FUNDING_KEY");
// Create a new user
var user = new Hyperthetical.User(client);
// Set the graph for the user
await user.SetGraphAsync("GRAPH_NAME", "GRAPH_USERNAME");
// Chat with the graph
var response = await user.ChatAsync(new List<string> { "Hello, Hyperthetical!" });
Console.WriteLine(response);
Usage
Client
The Client
class is the primary point of interaction. It manages the base URL, the funding key, and client functions.
var client = new Hyperthetical.Client("YOUR_FUNDING_KEY");
You can add custom client functions to the client:
client.AddClientFunction("functionName", function);
User
For each interaction, a separate User
object should be created. This helps in managing session data, the graph a user is communicating with, and other attributes.
var user = new Hyperthetical.User(client);
The User
class provides methods to run graphs, chat with them, and fetch available graphs.
RunGraphRequest and RunGraphResponse
These classes help in sending requests to run specific graphs and process the responses received.
Other Models
There are other models like ClientFunction
, GraphNodeData
, KeyData
, etc., that help in various functionalities and interactions within the library.
Examples
Here are some more detailed examples:
Example 1: Fetching Available Graphs
var availableGraphs = await user.GetAvailableGraphsAsync();
foreach(var graph in availableGraphs)
{
Console.WriteLine(graph.Name + ": " + graph.Description);
}
Example 2: Custom Client Function
void MyCustomFunction(List<List<string>> args, Hyperthetical.User user)
{
// Your custom code here
}
client.AddClientFunction("MyFunction", MyCustomFunction);
Contributing
We welcome contributions! Contact me at xo@hyperthetical.dev if you want to ask about a contribution, otherwise just make a pull request.
License
For detailed documentation, please refer to the official Hyperthetical docs.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.