From 327392ae1789e29a2ff5a7d547e68cd074b3757d Mon Sep 17 00:00:00 2001 From: Tao Chen Date: Tue, 21 Mar 2023 21:19:58 -0700 Subject: [PATCH 1/4] Update sample 4 readme --- samples/apps/github-qna-webapp-react/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/samples/apps/github-qna-webapp-react/README.md b/samples/apps/github-qna-webapp-react/README.md index 38b165762e28..7d73f3d4656b 100644 --- a/samples/apps/github-qna-webapp-react/README.md +++ b/samples/apps/github-qna-webapp-react/README.md @@ -10,7 +10,7 @@ 1. You will need an [Open AI Key](https://openai.com/api/) or [Azure Open AI Service key](https://learn.microsoft.com/azure/cognitive-services/openai/quickstart) for this sample. -2. Ensure the service API is already running `http://localhost:7071`. If not learn +2. Ensure the service API is already running `http://localhost:7071`. If not, learn how to start it [here](../../dotnet/KernelHttpServer/README.md). 3. **Run** the following command `yarn install` (if you have never run the sample before) and/or `yarn start` from the command line. @@ -24,7 +24,12 @@ to get answers about it. The sample highlights how [memory](https://aka.ms/sk/me and [embeddings](https://aka.ms/sk/embeddings) work along with the [SemanticTextPartitioner](../../../dotnet/src/SemanticKernel/SemanticFunctions/Partitioning/SemanticTextPartitioner.cs) when the size of the data is larger than the allowed token limited. -Each SK function will call Open AI to perform the tasks you ask about.​ +Each SK function will call Open AI to perform the tasks you ask about. + +This sample will create embeddings only for markdown files by default in +order to save time and costs. You can change the filter by going to +[GitHubSkill.cs](/semantic-kernel/blob/memory-sample/samples/dotnet/github-skills/GitHubSkill.cs) +and editing the searchPattern filter. > [!CAUTION] > Each function will call Open AI which will use tokens that you will be billed for. From 6b954c6a7aefeb2a3caf52a665e563f53fb40bc2 Mon Sep 17 00:00:00 2001 From: Tao Chen Date: Tue, 21 Mar 2023 21:37:09 -0700 Subject: [PATCH 2/4] Add subtext for embedding file type --- .../src/components/GitHubRepoSelection.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/samples/apps/github-qna-webapp-react/src/components/GitHubRepoSelection.tsx b/samples/apps/github-qna-webapp-react/src/components/GitHubRepoSelection.tsx index 7807426b9705..744c9ebde922 100644 --- a/samples/apps/github-qna-webapp-react/src/components/GitHubRepoSelection.tsx +++ b/samples/apps/github-qna-webapp-react/src/components/GitHubRepoSelection.tsx @@ -1,6 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. import { Body1, Button, Input, Label, Spinner, Title3 } from '@fluentui/react-components'; +import { InfoLabel } from '@fluentui/react-components/unstable'; import { ArrowDownload16Regular, CheckmarkCircle20Filled, ErrorCircle20Regular } from '@fluentui/react-icons'; import { FC, useEffect, useState } from 'react'; import { useSemanticKernel } from '../hooks/useSemanticKernel'; @@ -122,9 +123,19 @@ const GitHubProjectSelection: FC = ({ uri, keyConfig, prevProject, prevBr onClick={() => download()} /> - +
+ + + Only files of type below will be used for embedding and for answers. +
+ } + htmlFor={`EmbeddingFileTypeTooltip`} + /> +
Date: Wed, 22 Mar 2023 14:51:58 -0700 Subject: [PATCH 3/4] Address feedback --- samples/apps/github-qna-webapp-react/README.md | 5 +---- .../src/components/GitHubRepoSelection.tsx | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/samples/apps/github-qna-webapp-react/README.md b/samples/apps/github-qna-webapp-react/README.md index 7d73f3d4656b..80c081711af1 100644 --- a/samples/apps/github-qna-webapp-react/README.md +++ b/samples/apps/github-qna-webapp-react/README.md @@ -26,10 +26,7 @@ and [embeddings](https://aka.ms/sk/embeddings) work along with the when the size of the data is larger than the allowed token limited. Each SK function will call Open AI to perform the tasks you ask about. -This sample will create embeddings only for markdown files by default in -order to save time and costs. You can change the filter by going to -[GitHubSkill.cs](/semantic-kernel/blob/memory-sample/samples/dotnet/github-skills/GitHubSkill.cs) -and editing the searchPattern filter. +In order to reduce costs and improve overall performance, this sample app indexes only content extracted from markdown files. > [!CAUTION] > Each function will call Open AI which will use tokens that you will be billed for. diff --git a/samples/apps/github-qna-webapp-react/src/components/GitHubRepoSelection.tsx b/samples/apps/github-qna-webapp-react/src/components/GitHubRepoSelection.tsx index 744c9ebde922..02ea671aa8ce 100644 --- a/samples/apps/github-qna-webapp-react/src/components/GitHubRepoSelection.tsx +++ b/samples/apps/github-qna-webapp-react/src/components/GitHubRepoSelection.tsx @@ -130,7 +130,7 @@ const GitHubProjectSelection: FC = ({ uri, keyConfig, prevProject, prevBr - Only files of type below will be used for embedding and for answers. + Embedding and answers will be based on the files of the type indicated below.
} htmlFor={`EmbeddingFileTypeTooltip`} From ee3e604137d440d3285340645ceced0166884767 Mon Sep 17 00:00:00 2001 From: Devis Lucato Date: Thu, 23 Mar 2023 13:11:54 -0700 Subject: [PATCH 4/4] wrap text --- samples/apps/github-qna-webapp-react/README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/apps/github-qna-webapp-react/README.md b/samples/apps/github-qna-webapp-react/README.md index 80c081711af1..b2227cfdd513 100644 --- a/samples/apps/github-qna-webapp-react/README.md +++ b/samples/apps/github-qna-webapp-react/README.md @@ -26,7 +26,8 @@ and [embeddings](https://aka.ms/sk/embeddings) work along with the when the size of the data is larger than the allowed token limited. Each SK function will call Open AI to perform the tasks you ask about. -In order to reduce costs and improve overall performance, this sample app indexes only content extracted from markdown files. +In order to reduce costs and improve overall performance, this sample app indexes +only content extracted from markdown files. > [!CAUTION] > Each function will call Open AI which will use tokens that you will be billed for. @@ -39,6 +40,6 @@ for how to create Skills. Join the community: Join our [Discord community](https://aka.ms/SKDiscord) to share ideas and get help​. -Contribute: We need your help to make this the best it can be. Learn how you +Contribute: We need your help to make this the best it can be. Learn how you can [contribute](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) -to this project.​ \ No newline at end of file +to this project.​