Skip to content

Commit

Permalink
Readme tweaks (#759)
Browse files Browse the repository at this point in the history
### Motivation and Context

UX

### Description

Small readme updates to help clarify a few things I questioned when
running this.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x ] The code builds clean without any errors or warnings
- [ x] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x ] All unit tests pass, and I have added new tests where possible
- [x ] I didn't break anyone 😄
  • Loading branch information
jongio authored Jan 23, 2024
1 parent f9ea331 commit 96259d3
Showing 1 changed file with 31 additions and 12 deletions.
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ You will need the following items to run the sample:
- [.NET 7.0 SDK](https://dotnet.microsoft.com/download/dotnet/7.0) _(via Setup install.\* script)_
- [Node.js](https://nodejs.org/en/download) _(via Setup install.\* script)_
- [Yarn](https://classic.yarnpkg.com/docs/install) _(via Setup install.\* script)_
- AI Service
- [Git](https://www.git-scm.com/downloads)
- AI Service (one of the following is required)

| AI Service | Requirement |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand All @@ -38,7 +39,13 @@ You will need the following items to run the sample:

1. Open PowerShell as an administrator.
> NOTE: Ensure that you have [PowerShell Core 6+](https://github.com/PowerShell/PowerShell) installed. This is different from the default PowerShell installed on Windows.
2. Setup your environment.
1. Clone this repository
```powershell
git clone https://github.com/microsoft/chat-copilot
```
1. Setup your environment.

The following is a script to help you install the dependencies required. Feel free to install `dotnet`, `nodejs`, and `yarn` with your method of choice or use this script.

```powershell
cd <path to chat-copilot>\scripts\
Expand All @@ -49,23 +56,27 @@ You will need the following items to run the sample:
> NOTE: If you receive an error that the script is not digitally signed or cannot execute on the system, you may need to [change the execution policy](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3#change-the-execution-policy) (see list of [policies](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3#powershell-execution-policies) and [scopes](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3#execution-policy-scope)) or [unblock the script](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-executionpolicy?view=powershell-7.3#example-4-unblock-a-script-to-run-it-without-changing-the-execution-policy).
3. Configure Chat Copilot.
1. Configure Chat Copilot.

```powershell
.\Configure.ps1 -AIService {AI_SERVICE} -APIKey {API_KEY} -Endpoint {AZURE_OPENAI_ENDPOINT}
```

- `AI_SERVICE`: `AzureOpenAI` or `OpenAI`.
- `API_KEY`: The `API key` for Azure OpenAI or for OpenAI.
- `AZURE_OPENAI_ENDPOINT`: The Azure OpenAI resource `Endpoint` address. Omit `-Endpoint` if using OpenAI.
- `AZURE_OPENAI_ENDPOINT`: The Azure OpenAI resource `Endpoint` address. This is only required when using Azure OpenAI, omit `-Endpoint` if using OpenAI.

- > **IMPORTANT:** For `AzureOpenAI`, if you deployed models `gpt-35-turbo` and `text-embedding-ada-002` with custom names (instead of each own's given name), also use the parameters:
- > **IMPORTANT:** For `AzureOpenAI`, if you deployed models `gpt-35-turbo` and `text-embedding-ada-002` with custom names (instead of the default names), also use the parameters:
```powershell
-CompletionModel {DEPLOYMENT_NAME} -EmbeddingModel {DEPLOYMENT_NAME} -PlannerModel {DEPLOYMENT_NAME}
```
4. Run Chat Copilot locally. This step starts both the backend API and frontend application.
> -PlannerModel name will be the same as -CompletionModel
Open the `.\Configure.ps1` script to see all of the available parameters.
1. Run Chat Copilot locally. This step starts both the backend API and frontend application.
```powershell
.\Start.ps1
Expand All @@ -83,8 +94,14 @@ You will need the following items to run the sample:
## Linux/macOS
1. Open Bash as an administrator.
2. Configure environment.
1. Open Bash as an Administrator.
1. Clone this repository
```bash
git clone https://github.com/microsoft/chat-copilot
```
1. Configure environment.

The following is a script to help you install the dependencies required. Feel free to install `dotnet`, `nodejs`, and `yarn` with your method of choice or use this script.

```bash
cd <path to chat-copilot>/scripts/
Expand All @@ -106,7 +123,7 @@ You will need the following items to run the sample:

> NOTE: This script uses `homebrew` to install `dotnet-sdk`, `nodejs`, and `yarn`.
3. Configure Chat Copilot.
1. Configure Chat Copilot.

1. For OpenAI

Expand All @@ -128,7 +145,7 @@ You will need the following items to run the sample:
- `API_KEY`: The `API key` for Azure OpenAI.

**IMPORTANT:** If you deployed models `gpt-35-turbo` and `text-embedding-ada-002`
with custom names (instead of each own's given name), you need to specify
with custom names (instead of the default names), you need to specify
the deployment names with three additional parameters:

```bash
Expand All @@ -140,7 +157,9 @@ You will need the following items to run the sample:
--embeddingmodel {DEPLOYMENT_NAME}
```

4. Run Chat Copilot locally. This step starts both the backend API and frontend application.
`--plannermodel` will be the same name as `--completionmodel`

1. Run Chat Copilot locally. This step starts both the backend API and frontend application.

```bash
./start.sh
Expand Down Expand Up @@ -248,7 +267,7 @@ By default, Chat Copilot runs locally without authentication, using a guest user
- `AI_SERVICE`: `AzureOpenAI` or `OpenAI`.
- `API_KEY`: The `API key` for Azure OpenAI or for OpenAI.
- `AZURE_OPENAI_ENDPOINT`: The Azure OpenAI resource `Endpoint` address. Omit `-Endpoint` if using OpenAI.
- `AZURE_OPENAI_ENDPOINT`: The Azure OpenAI resource `Endpoint` address. This is only required when using Azure OpenAI, omit `-Endpoint` if using OpenAI.
- `FRONTEND_APPLICATION_ID`: The `Application (client) ID` associated with the application registration for the frontend.
- `BACKEND_APPLICATION_ID`: The `Application (client) ID` associated with the application registration for the backend.
- `TENANT_ID` : Your Azure AD tenant ID
Expand Down

0 comments on commit 96259d3

Please sign in to comment.