Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 2.06 KB

File metadata and controls

77 lines (55 loc) · 2.06 KB

OpenChat Playground with Foundry Local

This page describes how to run OpenChat Playground (OCP) with Foundry Local integration.

Get the repository root

  1. Get the repository root.

    # bash/zsh
    REPOSITORY_ROOT=$(git rev-parse --show-toplevel)
    # PowerShell
    $REPOSITORY_ROOT = git rev-parse --show-toplevel

Run on local machine

  1. Make sure the Foundry Local server is up and running with the following command.

    foundry service start
  2. Download the Foundry Local model. The default model OCP uses is phi-4-mini.

    foundry model download phi-4-mini

    Alternatively, if you want to run with a different model, say qwen2.5-7b, other than the default one, download it first by running the following command.

    foundry model download qwen2.5-7b

    Make sure to follow the model MUST be selected from the CLI output of foundry model list.

  3. Make sure you are at the repository root.

    cd $REPOSITORY_ROOT
  4. Run the app.

    # bash/zsh
    dotnet run --project $REPOSITORY_ROOT/src/OpenChat.PlaygroundApp -- \
        --connector-type FoundryLocal
    # PowerShell
    dotnet run --project $REPOSITORY_ROOT\src\OpenChat.PlaygroundApp -- `
        --connector-type FoundryLocal

    Alternatively, if you want to run with a different model, say qwen2.5-7b, make sure you've already downloaded the model by running the foundry model download qwen2.5-7b command.

    # bash/zsh
    dotnet run --project $REPOSITORY_ROOT/src/OpenChat.PlaygroundApp -- \
        --connector-type FoundryLocal \
        --alias qwen2.5-7b
    # PowerShell
    dotnet run --project $REPOSITORY_ROOT\src\OpenChat.PlaygroundApp -- `
        --connector-type FoundryLocal `
        --alias qwen2.5-7b
  5. Open your web browser, navigate to http://localhost:5280, and enter prompts.