#nlp #generative-ai #generative #ai

gpt_text

openai text wrapper just encaplusate the functions over one level

8 releases

0.1.7 Jan 9, 2024
0.1.6 Aug 3, 2023

#326 in Machine learning

Download history 5/week @ 2024-01-08 12/week @ 2024-02-26 5/week @ 2024-03-11 129/week @ 2024-04-01

134 downloads per month

MIT license

8KB
72 lines

gpt_text_wrapper

This is a encaplusate version of openai version called "fieri" . The basic function of this module is to reduce the excutation cycles such as nlp related tasks.

structure

  gpt_text 
  |------------- src
		|-------------lib.rs
  |------------- cargo.toml

module

-> openai

code

use gpt_text::openai;

let mut openc : _ = openai::new("cat translate into japanese".to_string(), "".to_string(), "cat".len().try_into().unwrap());
    
let wrap_gpt : _ = openc.openai_text_wrapper(openai_apikey).await{

        Ok(text) => text,
        Err(err) => panic!("Error = {:?}", err),
};

println!("Response = {:?}", wrap_gpt);

install

cargo add gpt_text

documentation

cargo doc --open	 

Dependencies

~11–25MB
~370K SLoC