Skip to content

petersalomonsen/near-openai

This branch is 27 commits ahead of, 1 commit behind main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6c3bb79 · Nov 30, 2024

History

44 Commits
Nov 30, 2024
Oct 26, 2024
Jan 29, 2024
May 15, 2023
Jan 29, 2024
May 7, 2023
Nov 30, 2024
Mar 14, 2023
Apr 30, 2023
Oct 11, 2024
Apr 30, 2023
Apr 27, 2023
Apr 27, 2023
May 7, 2023
Mar 14, 2023
Apr 27, 2023
Oct 28, 2024
May 7, 2023

Repository files navigation

OpenAI API client with NEAR

NEAR_ACCOUNT_ID=petersalomonsen.near node client.js "what now?"                                           
As an AI language model, I am a machine and do not have the ability to provide personalized advice without more information about your situation. Can you please provide more context or details about what you are seeking advice on?

This is a simple experiment to pay for OpenAI API requests using NEAR. Transactions are created and signed on the client and sent to the edge server that will post it ( or reject if it finds that the transaction was already posted ).

NOTE: This is very much work in progress and the payment model and API contract may change without notice.

WASI Preview 2

The wasip2 folder contains a Spin application, based on the WASI 2 and the WebAssembly Component Model ( https://component-model.bytecodealliance.org/ ). It is implemented in Rust as a serverless proxy for the OpenAI API.