BardAgent Documentation 📘
Overview 🌐
Bard, Google’s Language Learning Model (LLM), is a powerful and intelligent AI tool. We use the bardapi
module for interacting with the Bard LLM through its API. Remember, bardapi
isn’t the official Google API, but it’s quite effective, utilizing your cookie storage and session key to access Google APIs.
Notes 📌
- Default Session Key: If a
bard_session_key
is not provided when you initialize a BardAgent, the system defaults to using the_BARD_API_KEY
environment variable.
Example Usage 🚀
from comma_agents.hub.agents.cloai.bard import BardAgent
# Initialize a BardAgent instance
my_bard_agent = BardAgent("MyAgentName")
# Crafting a question for Bard
question = "How will AI evolve in the next decade?"
# Getting a thoughtful response from Bard
response = my_bard_agent._call_llm(question)
# Revealing Bard's insights
print(f"Bard's Insight: {response}")
In this example, you’ll see how to set up a BardAgent, pose a question to Bard, and receive an AI-powered response. It’s a straightforward and effective way to gain insights from Google’s Bard LLM using the BardAgent.