├── src
├── Splitters
│ ├── Abstractions
│ │ ├── src
│ │ │ ├── PublicAPI.Shipped.txt
│ │ │ ├── Code
│ │ │ │ ├── CodePartType.cs
│ │ │ │ ├── ICodeSplitter.cs
│ │ │ │ ├── CodePart.cs
│ │ │ │ └── ICodeCutter.cs
│ │ │ ├── Text
│ │ │ │ ├── ITextSplitter.cs
│ │ │ │ └── CharacterTextSplitter.cs
│ │ │ └── LangChain.Splitters.Abstractions.csproj
│ │ └── test
│ │ │ ├── LangChain.Splitters.Abstractions.Tests.csproj
│ │ │ ├── Tests.RecursiveCharacter.cs
│ │ │ └── Tests.MarkdownHeader.cs
│ ├── CSharp
│ │ ├── test
│ │ │ └── LangChain.Splitters.CSharp.Tests.csproj
│ │ └── src
│ │ │ └── LangChain.Splitters.CSharp.csproj
│ └── Directory.Build.props
├── DocumentLoaders
│ ├── Abstractions
│ │ └── src
│ │ │ ├── PublicAPI.Shipped.txt
│ │ │ ├── DataSourceType.cs
│ │ │ ├── DocumentLoaderSettings.cs
│ │ │ ├── IDocumentLoader.cs
│ │ │ ├── DocumentLookupExtensions.cs
│ │ │ ├── LangChain.DocumentLoaders.Abstractions.csproj
│ │ │ └── FileLoader.cs
│ ├── IntegrationTests
│ │ ├── Tests.cs
│ │ ├── Resources
│ │ │ ├── sample.pdf
│ │ │ ├── file-sample_1MB.docx
│ │ │ └── file_example_XLSX_50.xlsx
│ │ ├── Tests.Html.cs
│ │ ├── LangChain.DocumentLoaders.IntegrationTests.csproj
│ │ ├── Tests.Word.cs
│ │ └── Tests.Pdf.cs
│ ├── Directory.Build.props
│ ├── Word
│ │ └── src
│ │ │ ├── LangChain.DocumentLoaders.Word.csproj
│ │ │ ├── ExcelLoader.cs
│ │ │ └── WordLoader.cs
│ ├── WebBase
│ │ └── src
│ │ │ ├── LangChain.DocumentLoaders.Html.csproj
│ │ │ └── HtmlLoader.cs
│ └── Pdf
│ │ └── src
│ │ ├── AsposePdfSource.cs
│ │ ├── LangChain.DocumentLoaders.Pdf.csproj
│ │ └── PdfPigPdfSource.cs
├── key.snk
├── Helpers
│ ├── TrimmingHelper
│ │ ├── Program.cs
│ │ └── TrimmingHelper.csproj
│ └── GenerateDocs
│ │ └── GenerateDocs.csproj
├── Core
│ ├── src
│ │ ├── Cache
│ │ │ └── BaseCache.cs
│ │ ├── Base
│ │ │ ├── IBaseLanguageModelCallOptions.cs
│ │ │ ├── Handler.cs
│ │ │ ├── IBaseLanguageModelParams.cs
│ │ │ ├── IBaseLangChainParams.cs
│ │ │ ├── ChainInputs.cs
│ │ │ ├── BaseLangChain.cs
│ │ │ ├── Tracers
│ │ │ │ ├── TracerException.cs
│ │ │ │ ├── BaseCallbackHandlerInput.cs
│ │ │ │ └── StringExtensions.cs
│ │ │ ├── IBaseCallbackHandlerInput.cs
│ │ │ ├── BaseLanguageModel.cs
│ │ │ └── IChainInputs.cs
│ │ ├── Schema
│ │ │ ├── IPromptValue.cs
│ │ │ ├── ChatGeneration.cs
│ │ │ ├── IInputValues.cs
│ │ │ ├── IChainValues.cs
│ │ │ ├── PartialValues.cs
│ │ │ ├── InputValues.cs
│ │ │ ├── OutputValues.cs
│ │ │ ├── BasePromptValue.cs
│ │ │ ├── Generation.cs
│ │ │ ├── LLMResult.cs
│ │ │ └── OutputParserException.cs
│ │ ├── LLMs
│ │ │ ├── IBaseLlmCallOptions.cs
│ │ │ └── IBaseLlmParams.cs
│ │ ├── Callback
│ │ │ ├── CallbackManagerMethod.cs
│ │ │ ├── ICallbackManagerOptions.cs
│ │ │ ├── ICallbacks.cs
│ │ │ ├── CallbackManagerForToolRun.cs
│ │ │ └── ParentRunManager.cs
│ │ ├── Chains
│ │ │ ├── SerializedBaseChain.cs
│ │ │ ├── StackableChains
│ │ │ │ ├── Hooks
│ │ │ │ │ ├── StackableChainValues.cs
│ │ │ │ │ └── StackableChainHook.cs
│ │ │ │ ├── Agents
│ │ │ │ │ ├── Tools
│ │ │ │ │ │ ├── BuiltIn
│ │ │ │ │ │ │ └── Classes
│ │ │ │ │ │ │ │ └── GoogleResults.cs
│ │ │ │ │ │ ├── AgentToolLambda.cs
│ │ │ │ │ │ └── AgentTool.cs
│ │ │ │ │ ├── Crew
│ │ │ │ │ │ ├── Tools
│ │ │ │ │ │ │ ├── CrewAgentToolLambda.cs
│ │ │ │ │ │ │ └── CrewAgentTool.cs
│ │ │ │ │ │ ├── Crew.cs
│ │ │ │ │ │ └── AgentTask.cs
│ │ │ │ │ └── PromptedAgent.cs
│ │ │ │ ├── Extensions
│ │ │ │ │ └── HookExtension.cs
│ │ │ │ ├── Exceptions
│ │ │ │ │ └── StackableChainException.cs
│ │ │ │ ├── SetLambdaChain.cs
│ │ │ │ ├── SetChain.cs
│ │ │ │ ├── DoChain.cs
│ │ │ │ ├── UpdateMemoryChain.cs
│ │ │ │ ├── LoadMemoryChain.cs
│ │ │ │ ├── ImageToTextGeneration
│ │ │ │ │ └── ImageToTextGenerationChain.cs
│ │ │ │ ├── ImageGeneration
│ │ │ │ │ └── ImageGenerationChain.cs
│ │ │ │ ├── Files
│ │ │ │ │ └── SaveIntoFileChain.cs
│ │ │ │ └── RetreiveDocumentsChain.cs
│ │ │ ├── LLM
│ │ │ │ ├── SerializedLLMChain.cs
│ │ │ │ ├── ILlmChainInput.cs
│ │ │ │ ├── ILlmChain.cs
│ │ │ │ └── LLMChainInput.cs
│ │ │ ├── CombineDocuments
│ │ │ │ ├── BaseCombineDocumentsChainInput.cs
│ │ │ │ ├── AnalyzeDocumentsChainInput.cs
│ │ │ │ ├── ReduceDocumentsChainInput.cs
│ │ │ │ ├── MapReduceDocumentsChainInput.cs
│ │ │ │ └── StuffDocumentsChainInput.cs
│ │ │ ├── RetrievalQA
│ │ │ │ ├── RetrievalQaChainInput.cs
│ │ │ │ ├── BaseRetrievalQaChainInput.cs
│ │ │ │ └── RetrievalQaChain.cs
│ │ │ ├── ConversationalRetrieval
│ │ │ │ ├── ChatTurnTypeHelper.cs
│ │ │ │ └── ConversationalRetrievalChainInput.cs
│ │ │ └── Sequentials
│ │ │ │ └── SequentialChainInput.cs
│ │ ├── Prompts
│ │ │ ├── LiteralNode.cs
│ │ │ ├── SerializedPromptTemplate.cs
│ │ │ ├── VariableNode.cs
│ │ │ ├── TemplateFormatOptions.cs
│ │ │ ├── ParsedFStringNode.cs
│ │ │ ├── Base
│ │ │ │ ├── IBasePromptTemplateInput.cs
│ │ │ │ ├── StringPromptValue.cs
│ │ │ │ └── BaseStringPromptTemplate.cs
│ │ │ ├── IPromptTemplateInput.cs
│ │ │ ├── SerializedBasePromptTemplate.cs
│ │ │ ├── SerializedMessagePromptTemplate.cs
│ │ │ ├── ChatPromptTemplateInput.cs
│ │ │ ├── ChatPromptValue.cs
│ │ │ ├── PromptTemplateInput.cs
│ │ │ ├── AIMessagePromptTemplate.cs
│ │ │ ├── HumanMessagePromptTemplate.cs
│ │ │ ├── SystemMessagePromptTemplate.cs
│ │ │ ├── ChatMessagePromptTemplate.cs
│ │ │ ├── BaseMessageStringPromptTemplate.cs
│ │ │ ├── BaseChatPromptTemplate.cs
│ │ │ └── BaseMessagePromptTemplate.cs
│ │ ├── Extensions
│ │ │ ├── AddDocumentsToDatabaseBehavior.cs
│ │ │ ├── VectorSearchResponseExtesions.cs
│ │ │ ├── SourceExtensions.cs
│ │ │ └── VectorStoreIndexWrapper.cs
│ │ ├── Common
│ │ │ └── DictionaryExtensions.cs
│ │ ├── Retrievers
│ │ │ ├── WebSearchRetriever.cs
│ │ │ └── VectorStoreRetrieverExtensions.cs
│ │ ├── Utilities
│ │ │ └── IWebSearch.cs
│ │ └── Memory
│ │ │ ├── ConversationBufferMemory.cs
│ │ │ └── BaseMemory.cs
│ └── test
│ │ └── UnitTests
│ │ ├── LangChain.Core.UnitTests.csproj
│ │ ├── Tools
│ │ └── GoogleCustomSearchToolTests.cs
│ │ ├── DocumentLoaderTests.cs
│ │ ├── PromptTests.cs
│ │ ├── Utilities
│ │ └── DuckDuckGoSearchTests.cs
│ │ └── MemoryTests.cs
├── Meta
│ ├── test
│ │ ├── Resources
│ │ │ └── Harry-Potter-Book-1.pdf
│ │ ├── ProviderType.cs
│ │ ├── WikiTests.HowToUseOpenAiProviderSmaller.cs
│ │ ├── DatabaseTestEnvironment.cs
│ │ ├── LangChain.IntegrationTests.csproj
│ │ ├── CalculatorTool.cs
│ │ ├── AzureOpenAiTests.cs
│ │ └── OpenAiTests.cs
│ └── src
│ │ └── LangChain.csproj
├── Directory.Build.targets
├── Testing.targets
├── Cli
│ ├── src
│ │ ├── Models
│ │ │ ├── Provider.cs
│ │ │ ├── Format.cs
│ │ │ └── Tool.cs
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── Program.cs
│ │ ├── Commands
│ │ │ └── DoCommand.cs
│ │ ├── CommonOptions.cs
│ │ └── LangChain.Cli.csproj
│ ├── test
│ │ └── LangChain.Cli.IntegrationTests
│ │ │ ├── LangChain.Cli.IntegrationTests.csproj
│ │ │ └── TestExtensions.cs
│ └── README.md
├── Serve
│ ├── Abstractions
│ │ └── LangChain.Serve.Abstractions
│ │ │ ├── Repository
│ │ │ ├── MessageAuthor.cs
│ │ │ ├── StoredMessage.cs
│ │ │ └── StoredConversation.cs
│ │ │ ├── IConversationNameProvider.cs
│ │ │ ├── LangChain.Serve.Abstractions.csproj
│ │ │ └── IConversationRepository.cs
│ ├── src
│ │ ├── Classes
│ │ │ └── DTO
│ │ │ │ ├── ConversationCreationDTO.cs
│ │ │ │ ├── PostMessageDTO.cs
│ │ │ │ ├── MessageDTO.cs
│ │ │ │ └── ConversationDTO.cs
│ │ ├── Services
│ │ │ ├── CustomNameProvider.cs
│ │ │ └── DateConversationNameProvider.cs
│ │ ├── LangChain.Serve.csproj
│ │ └── ServeOptions.cs
│ └── OpenAI
│ │ ├── ServeOptions.cs
│ │ ├── LangChain.Serve.OpenAI.csproj
│ │ └── ServeController.cs
├── Utilities
│ ├── Sql
│ │ └── src
│ │ │ ├── SqlRunFetchType.cs
│ │ │ ├── LangChain.Utilities.Sql.csproj
│ │ │ └── StringHelperer.cs
│ ├── Directory.Build.props
│ ├── Pollyfils
│ │ └── src
│ │ │ ├── StringExtensions.StartsWith.cs
│ │ │ ├── StreamExtensions.CopyToAsync.cs
│ │ │ ├── HttpContext.ReadAsStringAsync.CancellationToken.cs
│ │ │ ├── HttpClient.GetStreamAsync.CancellationToken.cs
│ │ │ ├── HttpClient.GetByteArrayAsync.CancellationToken.cs
│ │ │ ├── LangChain.Polyfills.csproj
│ │ │ ├── DictionaryExtensions.GetValueOrDefault.cs
│ │ │ ├── StringExtensions.Replace.cs
│ │ │ └── StringExtensions.Contains.cs
│ └── Postgres
│ │ ├── src
│ │ ├── StringBuilderExtensions.cs
│ │ └── LangChain.Utilities.Postgres.csproj
│ │ └── test
│ │ └── LangChain.Utilities.Postgres.IntegrationTests.csproj
├── Extensions
│ ├── Directory.Build.props
│ ├── Docker
│ │ └── src
│ │ │ ├── LangChain.Extensions.Docker.csproj
│ │ │ └── Chain.cs
│ └── DependencyInjection
│ │ └── src
│ │ ├── LangChain.Extensions.DependencyInjection.csproj
│ │ ├── ServiceCollectionExtensions.OpenAi.cs
│ │ ├── ServiceCollectionExtensions.Anyscale.cs
│ │ ├── ServiceCollectionExtensions.Anthropic.cs
│ │ └── ServiceCollectionExtensions.HuggingFace.cs
├── Directory.Build.props
└── Testing.props
├── assets
└── nuget_icon.png
├── docs
└── media
│ └── icon128.png
├── global.json
├── examples
├── LangChain.Samples.AspNet
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── LangChain.Samples.AspNet.csproj
│ ├── Program.cs
│ ├── Properties
│ │ └── launchSettings.json
│ └── Controllers
│ │ ├── AnthropicSampleController.cs
│ │ └── OpenAiSampleController.cs
├── LangChain.Samples.Serve
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── Properties
│ │ └── launchSettings.json
│ └── LangChain.Samples.Serve.csproj
├── LangChain.Samples.Serve.OpenAI
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── Properties
│ │ └── launchSettings.json
│ ├── Program.cs
│ └── LangChain.Samples.Serve.OpenAI.csproj
├── LangChain.Samples.Azure
│ ├── LangChain.Samples.Azure.csproj
│ └── Program.cs
├── LangChain.Samples.Memory
│ └── LangChain.Samples.Memory.csproj
├── LangChain.Samples.OpenAI
│ ├── LangChain.Samples.OpenAI.csproj
│ └── Program.cs
├── LangChain.Samples.Prompts
│ ├── LangChain.Samples.Prompts.csproj
│ └── Program.cs
├── LangChain.Samples.HuggingFace
│ ├── LangChain.Samples.HuggingFace.csproj
│ └── Program.cs
├── LangChain.Samples.SequentialChain
│ ├── LangChain.Samples.SequentialChain.csproj
│ └── Program.cs
└── LangChain.Samples.LocalRAG
│ └── LangChain.Samples.LocalRAG.csproj
├── .github
├── workflows
│ ├── pull-request.yml
│ ├── auto-labeling.yml
│ ├── dotnet.yml
│ └── github-releases-to-discord.yml
└── dependabot.yml
├── LangChain.sln.DotSettings
├── LICENSE
└── sweep.yaml
/src/Splitters/Abstractions/src/PublicAPI.Shipped.txt:
--------------------------------------------------------------------------------
1 | #nullable enable
--------------------------------------------------------------------------------
/src/DocumentLoaders/Abstractions/src/PublicAPI.Shipped.txt:
--------------------------------------------------------------------------------
1 | #nullable enable
--------------------------------------------------------------------------------
/src/key.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryAGI/LangChain/HEAD/src/key.snk
--------------------------------------------------------------------------------
/assets/nuget_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryAGI/LangChain/HEAD/assets/nuget_icon.png
--------------------------------------------------------------------------------
/docs/media/icon128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryAGI/LangChain/HEAD/docs/media/icon128.png
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "rollForward": "latestMajor",
4 | "allowPrerelease": false
5 | }
6 | }
--------------------------------------------------------------------------------
/src/Helpers/TrimmingHelper/Program.cs:
--------------------------------------------------------------------------------
1 | Console.WriteLine("Build, rebuild or publish this app to see trimming warnings.");
--------------------------------------------------------------------------------
/src/Core/src/Cache/BaseCache.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.Cache;
2 |
3 | ///
4 | ///
5 | ///
6 | public abstract class BaseCache;
--------------------------------------------------------------------------------
/src/Meta/test/Resources/Harry-Potter-Book-1.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryAGI/LangChain/HEAD/src/Meta/test/Resources/Harry-Potter-Book-1.pdf
--------------------------------------------------------------------------------
/src/DocumentLoaders/IntegrationTests/Tests.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.DocumentLoaders.IntegrationTests;
2 |
3 | [TestFixture]
4 | public partial class Tests;
--------------------------------------------------------------------------------
/src/Directory.Build.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/Testing.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/DocumentLoaders/IntegrationTests/Resources/sample.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryAGI/LangChain/HEAD/src/DocumentLoaders/IntegrationTests/Resources/sample.pdf
--------------------------------------------------------------------------------
/src/Cli/src/Models/Provider.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.Cli.Models;
2 |
3 | internal enum Provider
4 | {
5 | OpenAi,
6 | OpenRouter,
7 | Anthropic,
8 | Free,
9 | }
--------------------------------------------------------------------------------
/src/Core/src/Base/IBaseLanguageModelCallOptions.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.Base;
2 |
3 | ///
4 | ///
5 | ///
6 | public interface IBaseLanguageModelCallOptions;
--------------------------------------------------------------------------------
/src/Core/src/Schema/IPromptValue.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.Abstractions.Schema;
2 |
3 | ///
4 | ///
5 | ///
6 | public interface IPromptValue
7 | {
8 |
9 | }
--------------------------------------------------------------------------------
/src/DocumentLoaders/Abstractions/src/DataSourceType.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.DocumentLoaders;
2 |
3 | public enum DataSourceType
4 | {
5 | Uri,
6 | Path,
7 | Stream,
8 | }
--------------------------------------------------------------------------------
/src/DocumentLoaders/IntegrationTests/Resources/file-sample_1MB.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryAGI/LangChain/HEAD/src/DocumentLoaders/IntegrationTests/Resources/file-sample_1MB.docx
--------------------------------------------------------------------------------
/src/Cli/src/Models/Format.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.Cli;
2 |
3 | internal enum Format
4 | {
5 | Text,
6 | Lines,
7 | Json,
8 | Markdown,
9 | ConventionalCommit,
10 | }
--------------------------------------------------------------------------------
/src/Cli/src/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "FixOpenApiSpec": {
4 | "commandName": "Project",
5 | "commandLineArgs": "do --help"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/DocumentLoaders/IntegrationTests/Resources/file_example_XLSX_50.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tryAGI/LangChain/HEAD/src/DocumentLoaders/IntegrationTests/Resources/file_example_XLSX_50.xlsx
--------------------------------------------------------------------------------
/src/Core/src/LLMs/IBaseLlmCallOptions.cs:
--------------------------------------------------------------------------------
1 | using LangChain.Base;
2 |
3 | namespace LangChain.LLMS;
4 |
5 | ///
6 | public interface IBaseLlmCallOptions : IBaseLanguageModelCallOptions { }
--------------------------------------------------------------------------------
/src/Serve/Abstractions/LangChain.Serve.Abstractions/Repository/MessageAuthor.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.Serve.Abstractions.Repository;
2 |
3 | public enum MessageAuthor
4 | {
5 | User,
6 | Ai,
7 | }
--------------------------------------------------------------------------------
/src/Core/src/Callback/CallbackManagerMethod.cs:
--------------------------------------------------------------------------------
1 | namespace LangChain.Callback;
2 |
3 | ///
4 | ///
5 | ///
6 | public delegate Task