edvm / gpti Goto Github PK
View Code? Open in Web Editor NEWGPTi is a tool built in Rust that lets you interact with the OpenAI GPT-3 model from the comfort of your command line.
License: MIT License
GPTi is a tool built in Rust that lets you interact with the OpenAI GPT-3 model from the comfort of your command line.
License: MIT License
If -some option
(think about a good name) is passed along with a text (string) then use that as a prompt, instead of checking if its defined in the .toml config file.
Take config file from ~/.gpti.toml, if not found, check if it was defined by -c
(command line argument). If not found, print an error and exit the program.
Right now, model is hardcoded in the source code:
let chat_completion = ChatCompletion::builder("gpt-3.5-turbo", messages.clone())
.create()
.await
.unwrap();
Move it to .toml
config file so users are free to set the model they want to use
if -cb
is given, then copy the output we get from OpenAI to the clipboard. This make it easier to later paste the response we got from OpenAI.
Would be a nice touch to add "spinners" so while we wait to get a response from OpenAI API we show a spinner in the terminal: https://crates.io/crates/spinners
On match
expresisons, on Err
branches, use early returns
to make the code return an error (now probably its doing .unrwap() because I'm learning Rust heh)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.