EvilCorp SecondPilot
A wrapper to the EvilCorp SecondPilot API, allowing developers to utilize its powerful auto-completion and code generation capabilities in their own applications. This client uses the futures-util, reqwest, and serde crates, among others.
Features
- Simplifies interaction with EvilCorp SecondPilot API.
- Supports customization of API requests including model, stream, intent, and other parameters.
- Conveniently handles authorization with the EvilCorp SecondPilot API.
Usage
Add this to your Cargo.toml:
[]
= "^2.0.0"
Then, import the library and use the EvilcorpSecondPilotClient struct as follows:
use ;
let client =
new;
let message = Message ;
let request = new
.with_model
.with_temperature
.with_top_p
.add_message
.build
.await;
let response = client.query.await?;
println!;
Structure
TokenResponseis a helper struct that wraps the response from the token endpoint of the API.CompletionRequestis a helper struct that wraps a request to the completions endpoint.Messageis a helper struct that wraps a message to be included in aCompletionRequest.CompletionRequestBuilderis a struct to help buildCompletionRequestobjects.CompletionResponse,Choice, andDeltaare helper structs that wrap responses from the completions endpoint.EvilcorpSecondPilotClientis the main struct that communicates with the EvilCorp SecondPilot API.
License
This project is licensed under the MIT License.
Please note that this project is in no way affiliated with, authorized, maintained, sponsored or endorsed by EvilCorp or any of its affiliates or subsidiaries. This is an independent and unofficial API wrapper.