Skip to content

Fixed version placeholder #565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following example demonstrates how to use the GenAI-powered Document Insight

>note The following code snippet is valid for Azure Open AI 9.3. The specific **IChatClient** initialization may be different according to the specific version.

>important For **.NET Framework** and **.NET Standard** an [IEmbeddingsStorage]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-partial-context-question-processor%}#implementing-custom-iembeddingsstorage) implementation is required for the [PartialContextQuestionProcessor]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-partial-context-question-processor%}).
>important For .NET {{site.mindotnetversion}}+ (Target OS Windows) with [Packages for .NET Framework and .NET 8 and .NET 9 for Windows]({%slug available-nuget-packages%}#packages-for-net-framework-and-net-{{site.mindotnetversion}}-and-net-{{site.maxdotnetversion}}-for-windows), an [IEmbeddingsStorage]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-partial-context-question-processor%}#implementing-custom-iembeddingsstorage) implementation is required for the [PartialContextQuestionProcessor]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-partial-context-question-processor%}).

#### __[C#] Example 1: Using GenAI-powered Document Insights__

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ The **PartialContextQuestionProcessor** is ideal for the following scenarios:

|Constructor|Platform|Description|
|---|---|---|
|**PartialContextQuestionProcessor(IChatClient chatClient, int modelMaxInputTokenLimit, ISimpleTextDocument document)**|.NET {{site.mindotnetversion}}|Creates an instance with built-in embeddings storage|
|**PartialContextQuestionProcessor(IChatClient chatClient, int modelMaxInputTokenLimit, ISimpleTextDocument document)**|_Specific*_ |Creates an instance with built-in embeddings storage|
|**PartialContextQuestionProcessor(IChatClient chatClient, IEmbeddingsStorage embeddingsStorage, int modelMaxInputTokenLimit, ISimpleTextDocument document)**|Any|Creates an instance with custom embeddings storage|

> The .NET {{site.mindotnetversion}} constructor uses **DefaultEmbeddingsStorage** internally, while the cross-platform constructor requires a custom implementation of **IEmbeddingsStorage** as shown in the [Prerequisites]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-prerequisites%}#iembeddingsstorage-setup-for-net-standard-and-net-framework).
> _*Specific_ The .NET {{site.mindotnetversion}}+ (Target OS Windows) + [Packages for .NET Framework and .NET 8 and .NET 9 for Windows]({%slug available-nuget-packages%}#packages-for-net-framework-and-net-{{site.mindotnetversion}}-and-net-{{site.maxdotnetversion}}-for-windows) constructor uses **DefaultEmbeddingsStorage** internally, while the cross-platform constructor requires a custom implementation of **IEmbeddingsStorage** as shown in the [Custom IEmbeddingsStorage Setup]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-partial-context-question-processor%}#implementing-custom-iembeddingsstorage) section.

### Properties and Methods

Expand All @@ -60,15 +60,15 @@ The settings class provides configuration options for the question-answering pro

## Usage Examples

#### Example 1: Using PartialContextQuestionProcessor in .NET {{site.mindotnetversion}} and Later
#### Example 1: Using PartialContextQuestionProcessor with default embeddings storage.

This example demonstrates how to use the PartialContextQuestionProcessor with the built-in embeddings storage on .NET {{site.mindotnetversion}} and later. For setting up the AI client, see the [AI Provider Setup]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-prerequisites%}#ai-provider-setup) section:
This example demonstrates how to use the **PartialContextQuestionProcessor** with the built-in embeddings storage on .NET {{site.mindotnetversion}}+ (Target OS Windows) + [Packages for .NET Framework and .NET 8 and .NET 9 for Windows]({%slug available-nuget-packages%}#packages-for-net-framework-and-net-{{site.mindotnetversion}}-and-net-{{site.maxdotnetversion}}-for-windows). For setting up the AI client, see the [AI Provider Setup]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-prerequisites%}#ai-provider-setup) section:

<snippet id='libraries-pdf-features-gen-ai-ask-questions-using-partial-context'/>

#### Example 2: Using PartialContextQuestionProcessor with Custom Embeddings (.NET Standard/.NET Framework)

This example demonstrates how to use the PartialContextQuestionProcessor with a custom embeddings storage implementation as described in the [IEmbeddingsStorage Setup]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-prerequisites%}#iembeddingsstorage-setup-for-net-standard-and-net-framework) section:
This example demonstrates how to use the **PartialContextQuestionProcessor** with a custom embeddings storage implementation as described in the [Custom IEmbeddingsStorage Setup]({%slug radpdfprocessing-features-gen-ai-powered-document-insights-partial-context-question-processor%}#implementing-custom-iembeddingsstorage) section:

<snippet id='libraries-pdf-features-gen-ai-ask-questions-using-partial-context-iembeddingsstorage'/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ table:nth-of-type(2) th {
# GenAI-powered Document Insights Prerequisites
This article explains the requirements for using the GenAI-powered Document Insights functionality in the [RadPdfProcessing library]({%slug radpdfprocessing-overview%}).

## Required Assemblies
## Required References

In addition to the [standard RadPdfProcessing assemblies]({%slug radpdfprocessing-getting-started%}#assembly-references), you will need to reference the following assemblies to use the GenAI-powered Document Insights features:
In addition to the [standard RadPdfProcessing references]({%slug radpdfprocessing-getting-started%}#assembly-references), you will need to add the following references to use the GenAI-powered Document Insights features:

|.NET Framework|.NET Standard-compatible|
|---|---|
|**Telerik.Windows.Documents.AIConnector.dll** * |**Telerik.Documents.AIConnector.dll** *|
|**Telerik.Windows.Documents.AIConnector** * |**Telerik.Documents.AIConnector** *|

The **Documents.AIConnector** assembly internally depends on **Microsoft.Extensions.AI.Abstractions** which is currently available only in **preview** version.*
> __*__ The **Documents.AIConnector** NuGet package internally depends on **Microsoft.Extensions.AI.Abstractions** and **SharpToken**.
>
> * **Microsoft.Extensions.AI.Abstractions** is currently available only in **preview** version.
> * If you are referencing an _assembly/dll_ of **Documents.AIConnector** instead of a NuGet package, you must manually add the **SharpToken** NuGet package.

## NuGet Packages

Expand Down