Code Monkey home page Code Monkey logo

langchain-dotnet's Introduction

IMPORTANT! This package is currently in an early alpha preview, please provide any feedback via GitHub issues.

CI NuGet

🦜️🔗 LangChain .NET

⚡ Building applications with LLMs through composability ⚡

🤔 What is this?

This is the .NET language implementation of LangChain.

Installing LangChain.NET

You should install LangChain.NET with NuGet:

Install-Package LangChain.NET

Or via the .NET Core command line interface:

dotnet add package LangChain.NET

Either commands, from Package Manager Console or .NET Core CLI, will download and install LangChain.NET and all required dependencies.

🎉 Examples

See examples for example usage.

var model = new OpenAI();

var result = await model.Call("What is a good name for a company that sells colourful socks?");

Console.WriteLine(result);
$ dotnet run .

Socktastic!

Or using chains

var llm = new OpenAi();

var template = "What is a good name for a company that makes {product}?";
var prompt = new PromptTemplate(new PromptTemplateInput(template, new List<string>(1){"product"}));

var chain = new LlmChain(new LlmChainInput(llm, prompt));

var result = await chain.Call(new ChainValues(new Dictionary<string, object>(1)
{
    { "product", "colourful socks" }
}));

// The result is an object with a `text` property.
Console.WriteLine(result.Value["text"]);
$ dotnet run .

Socktastic!

langchain-dotnet's People

Contributors

crazybaran avatar jeastham1993 avatar oorosh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

langchain-dotnet's Issues

RFC LLM Library Structure

Start Date

No response

Implementation PR

No response

Reference Issues

No response

Summary

An RFC to discuss the structure of the libraries. The proposal is to split the libraries down into a 'LangChain.NET.Core' library containing the core abstractions and the functionality. Each individual LLM would then be split down into individual libraries, allowing users to only take on the dependencies they need.

Basic Example

  • LangChain.NET.Core
  • LangChain.NET.OpenAI
  • LangChain.NET.HuggingFace

Drawbacks

More complicated project structure and deployment.

Unresolved questions

No response

💡 [REQUEST] - do we support vector db?

Start Date

2023-10-23

Implementation PR

No response

Reference Issues

No response

Summary

hope for this function

Basic Example

do we support vector db, like pincap,milvue

Drawbacks

do we support vector db, like pincap,milvue

Unresolved questions

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.