/openai-cli

This is a Rust library that provides a CLI (command-line interface) for easy and convenient access to the OpenAI ChatGPT API. The library offers a simple and straightforward way to integrate the ChatGPT API into your Rust-based applications.

Primary LanguageRustApache License 2.0Apache-2.0

Title: Rust-based CLI library for OpenAI ChatGPT API

Description: This is a Rust library that provides a CLI (command-line interface) for easy and convenient access to the OpenAI ChatGPT API. The library offers a simple and straightforward way to integrate the ChatGPT API into your Rust-based applications.

The library includes a set of functions for generating responses from the ChatGPT model, as well as handling authentication and error handling. The CLI interface provides a convenient way to interact with the ChatGPT API from the command line, making it ideal for testing and experimentation.

With this library, you can easily integrate OpenAI's state-of-the-art language processing capabilities into your Rust projects, enabling you to build sophisticated and intelligent applications that can understand natural language input.

Whether you're working on a chatbot, a virtual assistant, or a language translation tool, this library provides a powerful and flexible way to harness the full potential of the OpenAI ChatGPT API in your Rust-based projects.

User Guide

  1. Open the OpenAI official website and click here to enter the website. Then click on "API" and click here to access the API documentation.
    img.png
  2. Log in with your account. If you do not have an account, you can purchase one on Taobao by searching for "OPENAI account." If you have a VPN, you can log in directly on the official website.
    img_1.png
  3. Click "Account profile," then click "View API Keys."
    img_2.png
  4. Copy the Secret Key and click "Edit" in the upper right corner. Paste the Secret Key into the "Secret Key" field, and click "Save."
    img_3.png
  5. Enter the API token.
    img_4.png
  6. Input your question in the downloaded binary file and get an answer. image
  7. Enter your question and get the answer.
    image

使用教程


  1. 打开OpenAI官网,点击这里进入官网, 点击API,点击这里进入API文档
    img.png
  2. 登录 (账号密码可以再淘宝购买,搜OPENAI账号) (如果有梯子,可以直接登录官网)
    img_1.png
  3. 点击Account profile,然后点击View API Keys
    img_2.png
  4. 复制Secret Key,然后点击右上角的Edit,将Secret Key粘贴到Secret Key中,点击Save
    img_3.png
  5. 填入API token
    img_4.png
  6. 下载的二进制文件 image
  7. 输入问题 得到答案
    image