diff --git a/README.md b/README.md index 86d781d1..0c57e191 100644 --- a/README.md +++ b/README.md @@ -8,22 +8,27 @@ [![All Contributors](https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square)](#contributors-) -⚡ Building applications with LLMs through composability ⚡ +⚡ Building applications with LLMs through composability ⚡ + C# implementation of LangChain. We try to be as close to the original as possible in terms of abstractions, but are open to new entities. -While the [SemanticKernel](https://github.com/microsoft/semantic-kernel/) is good and we will use it wherever possible, we believe that it has many limitations and based on Microsoft technologies. -We proceed from the position of the maximum choice of available options and are open to using third-party libraries within individual implementations. +While [Semantic Kernel](https://github.com/microsoft/semantic-kernel/) is useful and we use it wherever possible, it does not cover every scenario and is closely tied to the Microsoft ecosystem. +We aim to offer the broadest practical choice of implementations and are open to using third-party libraries where appropriate. -I want to note: +Maintainer notes: - I’m unlikely to be able to make serious progress alone, so my goal is to unite the efforts of C# developers to create a C# version of LangChain and control the quality of the final project - I try to accept any Pull Request within 24 hours (of course, it depends, but I will try) - I'm also looking for developers to join the core team. I will sponsor them whenever possible and also share any money received. - I also respond quite quickly on Discord for any questions related to the project ## Usage -You can use our wiki to get started: https://tryagi.github.io/LangChain/ -If the wiki contains unupdated code, you can always take a look at [the tests for this](src/Meta/test/WikiTests.cs) + +You can use our wiki to get started: + +If the wiki contains outdated code, you can always take a look at [the tests for this](src/Meta/test/WikiTests.cs) + Also see [examples](./examples) for example usage or [tests](./src/tests/LangChain.IntegrationTests/ReadmeTests.cs). + ```csharp // Price to run from zero(create embeddings and request to LLM): 0,015$ // Price to re-run if database is exists: 0,0004$ @@ -36,7 +41,7 @@ var provider = new OpenAiProvider( var llm = new OpenAiLatestFastChatModel(provider); var embeddingModel = new TextEmbeddingV3SmallModel(provider); -// Create vector database from Harry Potter book pdf +// Create vector database from Harry Potter book PDF using var vectorDatabase = new SqLiteVectorDatabase(dataSource: "vectors.db"); var vectorCollection = await vectorDatabase.AddDocumentsFromAsync( embeddingModel, // Used to convert text to embeddings @@ -83,7 +88,7 @@ var chain = var chainAnswer = await chain.RunAsync("text"); // get chain result Console.WriteLine("Chain Answer:"+ chainAnswer); // print the result - + Console.WriteLine($"LLM usage: {llm.Usage}"); // Print usage and price Console.WriteLine($"Embedding model usage: {embeddingModel.Usage}"); // Print usage and price ``` @@ -97,16 +102,18 @@ Console.WriteLine($"Embedding model usage: {embeddingModel.Usage}"); // Print ## Support -Priority place for bugs: https://github.com/tryAGI/LangChain/issues -Priority place for ideas and general questions: https://github.com/tryAGI/LangChain/discussions -Discord: https://discord.gg/Ca2xhfBf3v +- Bugs: +- Ideas and general questions: +- Discord: ## Legal information and credits -It's licensed under [the MIT license](LICENSE). We do not plan to change the license in any foreseeable future for this project, -but projects based on this within the organization may have different licenses. -Some documentation is based on documentation from [dotnet/docs](https://github.com/dotnet/docs/) repository -under [CC BY 4.0 license](https://github.com/dotnet/docs/blob/main/LICENSE), -where code examples are changed to code examples for using this project. + +It's licensed under [the MIT license](LICENSE). We do not plan to change the license in any foreseeable future for this project, +but projects based on this within the organization may have different licenses. + +Some documentation is based on documentation from [dotnet/docs](https://github.com/dotnet/docs/) repository +under [CC BY 4.0 license](https://github.com/dotnet/docs/blob/main/LICENSE), +where code examples are changed to code examples for using this project. ## Acknowledgments