PaLM API
Get started using the PaLM API in Rust.
Usage
Get an API key from MakerSuite, then configure it here.
use create_client;
let client = create_client;
Use PalmClient
's generate_text()
method to have the model complete some initial text.
use new_text_body;
let mut text_body = new_text_body;
text_body.set_text_prompt;
let response = client
.generate_text
.expect;
println!;
Use PalmClient
's chat()
method to have a discussion with a model.
use new_chat_body;
let mut chat_body = new_chat_body;
chat_body.append_message;
let response = client
.chat
.expect;
let response2 = client
.reply
.expect;
println!;