From bb8b051d75e72b0f0bfe0c53c46fc541f651c8ad Mon Sep 17 00:00:00 2001 From: luisquintanilla Date: Tue, 30 Jul 2024 11:01:14 -0400 Subject: [PATCH] Added contributing and main README --- CONTRIBUTING.md | 25 +++++++++++++++++++ README.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..45d2129 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ +# Contributing to LlamaIndex .NET + +## Issues + +Found bugs or have feature requests? File an issue. + +## Documentation & Samples + +We encourage community submitted samples. All of our samples are in the [samples](./samples/README.md) directory. + +To create new samples, submit a pull request. + +## Development + +### Project Structure + +- `LlamaIndex.Core`: Core types and abstractions for LlamaIndex. +- `LlamaIndex.Core.Tests`: Unit tests for `LlamaIndex.Core`. +- `LlamaParse`: LlamaParse .NET client SDK +- `LlamaParse.Test`: Unit tests for LlamaParse .NET client SDK + +### Configuration + +1. Install [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) +1. Install [Visual Studio](https://visualstudio.microsoft.com/downloads/) or [Visual Studio Code](https://code.visualstudio.com/Download) \ No newline at end of file diff --git a/README.md b/README.md index 5977167..3d8ce7f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,63 @@ -# llamaindex.net -llamaindex interfaces for .net +# LlamaIndex.NET + +LlamaIndex.NET contains core types for working with LlamaIndex and client SDKs. + +At this time, the following are supported: + +- LlamaParse client SDK for .NET + +## What is LlamaIndex? + +[LlamaIndex](https://llamaindex.ai/) is a data framework for LLM applications. + +[LlamaCloud](https://docs.llamaindex.ai/en/stable/llama_cloud/) is a managed platfor for data parsing and ingestion. It consists of the following components: + +- [**LlamaParse**](https://docs.llamaindex.ai/en/stable/llama_cloud/llama_parse/): self-serve document parsing API +- **Ingestion and Retreival API**: Connect to 10+ data sources and sinks. Easily setup a data pipeline that can handle large volumes of data and incremental updates. +- **Evaluations and observability**: Run and track evaluations on your data and model + +## Important Links + +- Documentation: [https://docs.llamaindex.ai/en/stable/](https://docs.llamaindex.ai/en/stable/) +- Twitter: [https://twitter.com/llama_index](https://twitter.com/llama_index) +- Discord: [https://discord.gg/dGcwcsnxhU](https://discord.gg/dGcwcsnxhU) + +## Contributing + +Interested in contributing? See our [Contribution Guide](./CONTRIBUTING.md) for more details. + +## Example Usage + +Install the LlamaParse .NET SDK. + +You can find samples in the [samples directory](./samples/README.md). + +### Parse documents using the LlamaParse .NET SDK + +```csharp +using LlamaParse; + +// Initialize LlamaParse client +var parseConfig = new Configuration +{ + ApiKey = "YOUR-API-KEY"; +}; + +var client = new LlamaParseClient(new HttpClient(), parseConfig); + +// Get file info +var fileInfo = new FileInfo("attention-is-all-you-need.pdf"); + +// Parse document and format result as JSON +var documents = new List(); +await foreach(var document in client.LoadDataRawAsync(fileInfo, ResultType.Json) + { + documents.Add(document); + } + +// Output to console +foreach(var document in documents) +{ + Console.WriteLine(document); +} +``` \ No newline at end of file