WebSearcher OpenAI Plugin
October 2, 2023 ยท View on GitHub
IMPORTANT: This sample is for educational purposes only and is not recommended for production deployments.
An OpenAI Plugin that can be used to search the internet using Bing.
Prerequisites:
- A Bing Search Resource.
- Azure Function core tool.
- (Optional) An Azure Function resource for deployment.
Local dev
- Open
local.settings.jsonand enter theBingApiKey. The ApiKey can be found in your Bing Search resource in Azure portal. - Run the following command in a new terminal window
> func start
Deploy to Azure
- Create an Azure function resource.
- Create and set
PluginConfig:BingApiKeyto the Bing Api key in Configuration -> Application settings in Azure portal. - Publish the package by running
dotnet publish --output ./bin/publish --configuration "Release"
- Compress the published binary to a zip by running
Compress-Archive -Path .\bin\publish\* -DestinationPath .\bin\publish.zip
- Deploy to Azure via zip push
az functionapp deployment source config-zip -g [your resource group name] -n [your function app name] --src .\bin\publish.zip
Usage
You can test the functionality by using the Swagger UI. For example: "{your function url}/swagger/ui"
Note: The function app does't require any authentication when running locally.