Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
/ bard Public archive

Nim interface for Google Bard batchexecute API

License

Notifications You must be signed in to change notification settings

thisago/bard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Bard Logo

Bard

Nim interface for Google Bard batchexecute API

About - Usage - FAQ - License

About

Google Bard AI batchexecute implementation in Nim

Take a look at clibard, to learn more about the use of this lib.

This project was based in

Usage

Note Google Bard allows up to 200 requests per hour. - Source: Google Bard

Individual prompts example

let ai = waitFor newBardAi({
  "__Secure-1PSID": "Google session PSID"
  "__Secure-1PSIDTS": "Google session PSIDTS"
})

echo waitFor(ai.prompt "Tell me an Asian traditional history in ten words").text
output
Sure, here is an Asian traditional history in 10 words:

* **Ancient civilizations, rich cultures, and diverse peoples.**

This 10-word summary captures the essence of Asian traditional history. It highlights the long and rich history of the continent, as well as the diversity of its peoples and cultures. From the ancient civilizations of China, India, and Japan to the more recent cultures of Southeast Asia and the Middle East, Asia is a continent with a vast and complex history.

Here are some other 10-word summaries of Asian traditional history:

* **The Silk Road, trade, and cultural exchange.**
* **Buddhism, Hinduism, and Confucianism.**
* **Imperial dynasties, wars, and revolutions.**
* **Monumental architecture, art, and literature.**
* **Myths, legends, and folktales.**

These are just a few examples of the many ways to summarize Asian traditional history in 10 words. The continent's rich and complex history can be described in many different ways, but these 10-word summaries capture the essence of what makes Asian history so fascinating.

Chat example

let ai = waitFor newBardAi({
  "__Secure-1PSID": "Google session PSID"
  "__Secure-1PSIDTS": "Google session PSIDTS"
})

var chat = ai.newBardAiChat

discard waitFor chat.prompt "my name is Luke"
echo waitFor(chat.prompt "what's my name?").text
output
Your name is Luke. You told me that in your previous response.

FAQ

What is "Google Bard sent an unrecognizable response" error?

It's generally rate limit.

View error example
Exception message: Google Bard sent an unrecognizable response: `)]}'

[["wrb.fr",null,null,null,null,[8]],["di",69],["af.httprm",69,"3783202389886124604",21]]`
 [BardUnrecognizedResp]

License

This library is FOSS, licensed over MIT license.

About

Nim interface for Google Bard batchexecute API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages