Skip to content

ChatGPT plugin to query for Ethereum transactions and format for import into accounting software

Notifications You must be signed in to change notification settings

sustia-llc/sk-ethereumtx-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic Kernel ChatGPT plugin for Ethereum Txs

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

Example Output

Prerequisites

  • Install Docker and VS Code Dev Containers extension.
  • Clone project and run Dev-Containers: Reopen in Container command
    • The dev container will download and install the .NET 6 image and install the C#, Semantic Kernel Tools, and GitHub Copilot extensions.
  • Create a free Etherscan Account and get an API key

Using appsettings.json

Configure an OpenAI endpoint

  1. Copy settings.json.openai-example to ./appsettings.json
  2. Edit the kernel object to add your OpenAI endpoint configuration
  3. Edit the aiPlugin object to define the properties that get exposed in the ai-plugin.json file

Configure an Azure OpenAI endpoint

  1. Copy settings.json.azure-example to ./appsettings.json
  2. Edit the kernel object to add your Azure OpenAI endpoint configuration
  3. Edit the aiPlugin object to define the properties that get exposed in the ai-plugin.json file

Using local.settings.json

  1. Copy local.settings.json.example to ./azure-function/local.settings.json
  2. Edit the Values object to add your OpenAI endpoint configuration in the apiKey property
  3. Edit the Values object to add your Etherscan API endpoint configuration in the etherscanApiKey property

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.

About

ChatGPT plugin to query for Ethereum transactions and format for import into accounting software

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published