Refactor types into separate files

This commit is contained in:
2024-02-23 18:25:32 +00:00
parent 93285e53dd
commit b8f2b7e85e
7 changed files with 219 additions and 215 deletions

View File

@@ -20,9 +20,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let prompt = "Tell me the story of the genesis of the universe as a bedtime story.";
let request = GenerateContentRequest::from_prompt(prompt, None);
let queue = gemini
.stream_generate_content(&request, Model::GeminiPro)
.await;
let queue = gemini.stream_generate_content(&request, "gemini-pro").await;
while let Some(response) = queue.pop().await {
if let GenerateContentResponse::Ok {