Semantic Kernel ChatGPT plugin for Ethereum Txs
July 25, 2023 ยท View on GitHub
This project implements a ChatGPT plugin for Ethereum. It includes the following components:
- An endpoint that serves up an ai-plugin.json file for ChatGPT to discover the plugin
- A generator that automatically converts prompts into semantic function endpoints
- One native function that calls the Etherscan API endpoint for transaction information, and a CoinGecko API endpoint to get the historical price of Ethereum
- Two semantic functions that format the JSON response into CSV or OFX for import into accounting software
Example Output

Prerequisites
- Install
Dockerand VS CodeDev Containersextension. - Clone project and run
Dev-Containers: Reopen in Containercommand- The dev container will download and install the .NET 6 image and install the
C#,Semantic Kernel Tools, andGitHub Copilotextensions.
- The dev container will download and install the .NET 6 image and install the
- Create a free Etherscan Account and get an API key
Using appsettings.json
Configure an OpenAI endpoint
- Copy settings.json.openai-example to
./appsettings.json - Edit the
kernelobject to add your OpenAI endpoint configuration - Edit the
aiPluginobject to define the properties that get exposed in the ai-plugin.json file
Configure an Azure OpenAI endpoint
- Copy settings.json.azure-example to
./appsettings.json - Edit the
kernelobject to add your Azure OpenAI endpoint configuration - Edit the
aiPluginobject to define the properties that get exposed in the ai-plugin.json file
Using local.settings.json
- Copy local.settings.json.example to
./azure-function/local.settings.json - Edit the
Valuesobject to add your OpenAI endpoint configuration in theapiKeyproperty - Edit the
Valuesobject to add your Etherscan API endpoint configuration in theetherscanApiKeyproperty
Running the endpoint
To run the Azure Functions application just hit F5.
To build and run the Azure Functions application from a terminal use the following commands:
cd azure-function
dotnet build
func start --csharp
Test the endpoint with the Swagger UI
Learn More
To learn more, see the Semantic Kernel documentation that describes how to create a ChatGPT plugin.