Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External API access Proposal #86

Open
Emmanuel-Develops opened this issue May 14, 2024 · 0 comments
Open

External API access Proposal #86

Emmanuel-Develops opened this issue May 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Emmanuel-Develops
Copy link
Collaborator

Continuation with GPT tools in issue #67

Problem

Context passed to chat is limited to data in the ES Index. These data albeit useful may not be helpful for recent state of the blockchain.
e.g current block height, current difficulty, sat/vbyte, coinbase reward etc.

Proposal

Leveraging function calling tools, we can add some tools to chatbtc. In cases where GPT needs to access external realtime data, we can fetch those data from external apis: blockstream, mempool.space, blockchain explorer helping chatbtc stay up to date with the state of the blockchain.

Note: function calling returns that a function can be called mid-query and the parameters necessary to make that function call. We then call the function in the pipeline and pass the result to gpt while the main gpt API call is still ongoing

next steps: We can go further and include the ability to query specific block height, block hash, tx hash etc. This although becomes an overheard of writing individual functions for each query. BitQuery can help with that as it exposes a graphql query that we can construct dynamically. I won't go into more details here as this is beyond the scope of this proposal.

This proposal focuses on the current state of the blockchain and bitcoin network but this isn't comprehensive and tools can be expanded beyond that.

We can build a library of external API tools useful for chatBTC. E.g tool to interact with the github bitcoin repo itself (maybe bitcoin repo as a vector store) that can be utilized if users ask questions regarding functions that are present in bitcoin core. and so much more.

How do we start?

Our current pipeline using chat history understands the conversation and then the keywords necessary to answer the question, fetch data from the index, parse the data, then feed to gpt.
We can streamline this approach in one-shot.
How?, Let the search pipeline be a tool that gpt can use

  • Removes the need for a second smaller model to understand conversation and generate keywords
  • we don't always have to search at the start of the pipeline. We can search if the problem is related to bitcoin and context may be helpful, else fallback messages. (unnecessary search adds latency)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant