pawanapi
v1.0.4
Published
An api wrapper for the Pawan Api
Downloads
6
Readme
PawanApi Wrapper
An unnoficial API Wrapper for PawanApi
Installation
Before installing you need to have Node.js To install, use the npm install command:
$ npm install pawanapi --save
Documentation for embedding models can be found here Documentation for text and chat completions models can be found here In addition to the previous models, there are also some models implemented by Pawan which you can see in the official discord
There are some methods that require a token. You can obtain it in the official discord
Methods
- gtranslate(from,to,text): translate from language to language a text using google translate
- mtranslate(from,to,text): translate from language to language a text using microsoft translate
- embeddings(model,text): get the embeddings of a text using an OpenAI model | Needs Token to work
- tts(text,voice): get an audio stream of a voice reading the text
- completion(model,prompt,suffix,max_tokens,temperature,top_p,n,stream,logprobs,echo,stop,presence_penalty,frequency_penalty,best_of,logit_bias,user): Complete the prompt using the model for more information about every parameter Click Here | Needs Token to work
- chatcompletion(model,messages,temperature,top_p,n,stream,stop,max_tokens,presence_penalty,frequency_penalty,logit_bias,user): Complete the messages using the model for more information about every parameter Click Here | Needs Token to work
- dalle(prompt,n,size,user): Generates n images of the specified size following the prompt (user is just for openai moderation) | Needs Token to work
- resetip(): Reset the ip address associated with the token | Needs Token to work
- info(): Get information about your token | Needs Token to work
- models(): Get information about the models available | Needs Token to work
The methods that need a token to work won't work if the IP address is not the same as the one associated with the token.