scripts/Start-Backend.sh
(完整代码) 785B#!/bin/bash
# Initializes and runs the Copilot Chat backend.
set -e
ScriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ScriptDir/../WebApi"
# Parameters
AzureOpenAIOrOpenAIKey="$1"
case "$OSTYPE" in
darwin*)
dotnet dev-certs https --trust ;;
msys*)
dotnet dev-certs https --trust ;;
cygwin*)
dotnet dev-certs https --trust ;;
linux*)
dotnet dev-certs https ;;
esac
# If key provided, store it in user secrets
if [ "$AzureOpenAIOrOpenAIKey" != "" ]; then
dotnet user-secrets set "Completion:Key" "$AzureOpenAIOrOpenAIKey"
dotnet user-secrets set "Embedding:Key" "$AzureOpenAIOrOpenAIKey"
dotnet user-secrets set "Planner:AIService:Key" "$AzureOpenAIOrOpenAIKey"
fi
# Build and run the backend API server
dotnet build && dotnet run
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
