OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Genai.net

Genai.net is a C# library for building .NET applications that interact with large language models such as OpenAI. It provides model and service interfaces, in-memory conversations, function calling, prompt templates and tools that can be combined into workflows.

Independent OpenViST project profile, based on linked sources.

Genai.net — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when building a .NET application that needs language-model calls combined with conversation state or application-provided tools.

Who it is for

  • C# and .NET developers building applications that call language models.
  • Developers adding function selection, conversation context or tool workflows to a generative AI application.

Documented uses

  • Send prompts to an OpenAI language model and receive responses.
  • Maintain an in-memory conversation chain and refer to additional context through vector stores.
  • Describe functions and parameters so model responses can identify a function call.
  • Create prompt templates, sequence tools, or process data with a map-and-reduce tool.
Before you choose

Requirements & limits

The public repository specifies an MIT license. Its examples show an OpenAI API key supplied directly or through the OPENAI_API_KEY environment variable.

  • The documented model connection is to OpenAI; the repository describes a default language model for that connection.
  • Conversation chains are retained in memory, and the README mentions vector stores for additional context.
  • The function toolset relies on functions supplied to the conversation; the README does not describe automatic access to arbitrary application functions.
  • For sequential pipelines, the first tool may take multiple variables, but subsequent tools accept one input: the previous tool's result.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Send a prompt to an OpenAI language model

Create a language-model instance and request a response to a user message.

Before you start

  • A .NET project using GenAI.NET.
  • An OpenAI API key, supplied directly or through the OPENAI_API_KEY environment variable.
  • The model identifier shown in the example: gpt-3.5-turbo-0613.

Steps

  1. Create an OpenAILanguageModel with the model identifier and API key.

  2. Create a ChatMessage with Role.user and the prompt text.

  3. Call GetResponseAsync with the message sequence and temperature value 0.8.

  4. Read response.Response as the reply.

Expected outcome

The example obtains a response from the language model for the supplied user message.

Guide limitations

  • The recipe documents a direct language-model request; it does not document installation or project setup.
  • The example uses the specific model identifier gpt-3.5-turbo-0613; no model compatibility details are provided.
Source-based practical guide

Request a function call from an OpenAI language model

Describe a function and request that the model return function-call details for a user prompt.

Before you start

  • A .NET project using GenAI.NET.
  • An OpenAI API key, supplied directly or through the OPENAI_API_KEY environment variable.
  • A function name, description, and parameter descriptions.

Steps

  1. Create ParameterDescriptor entries for the function parameters, including descriptions and any optional type constraints.

  2. Create a FunctionDescriptor using the function name, description, and parameter list.

  3. Create an OpenAILanguageModel and a user ChatMessage containing the request.

  4. Call GetResponseAsync with the message sequence, function descriptor sequence, and temperature value 0.8.

  5. Inspect response.Type and response.Response for the function-call type and JSON function details.

Expected outcome

The example requests a function-call response containing function details as JSON.

Guide limitations

  • The example requests and inspects a function call; it does not show executing the described function.
  • The documentation does not guarantee that a model will return a function call for every prompt.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
AutomationAgent-AI/GenAI.NET · Official homepage title · retained in its source language