semvec/pypi-packages huggingface dataset:
bard-webapi 0.2.4
Reverse-engineered async API for Google Bard inspired by Gemini
License: MIT License
Requires Python: >=3.7
Keywords: API,async,Bard,Google Bard,Google,Gemini,LLM

# <img src="https://www.gstatic.com/lamda/images/favicon_v1_150160cddff7f294ce30.svg" width="35px" alt="Bard Icon" /> Bard-API

Reverse-engineered asynchronous API for Google Bard providing a simple but elegant interface inspired by official Gemini API.

## Installation

```bash
pip install bard-webapi
```

## Authentication

- Go to <https://bard.google.com/> and login with your Google account
- Press F12 for web inspector, go to `Network` tab and refresh the page
- Click any request and copy cookie values of `__Secure-1PSID` and `__Secure-1PSIDTS`

## Usage

### Initialization

```python
from bard_webapi import BardClient

# Replace "COOKIE VALUE HERE" with your actual cookie values as strings
Secure_1PSID = "COOKIE VALUE HERE"
Secure_1PSIDTS = "COOKIE VALUE HERE"

client = BardClient(Secure_1PSID, Secure_1PSIDTS, proxy=None)
await client.init()
```

### Generate contents from text inputs

```python
response = await client.generate_content("Hello World!")
print(response.text)  # Note: simply use print(response) to get the same output if you just want to see the response text
```

### Retrieve images in response

```python
response = await client.generate_content("Send me some pictures of cats")
images = response.images
for image in images:
    print(f"{image.title}({image.url}) - {image.alt}", sep="\n")
```

### Conversations across multiple turns

```python
chat = client.start_chat()  # A chat stores the metadata to keep a conversation continuous. It will automatically get updated after each turn
response1 = await chat.send_message("Briefly introduce Europe")
response2 = await chat.send_message("What's the population there?")
print(response1.text, response2.text, sep="\n----------------------------------\n")
```

### Check and switch to other answer candidates

```python
chat = client.start_chat()
response = await chat.send_message("What's the best Japanese dish in your mind? Choose one only.")
for candidate in response.candidates:
    print(candidate, "\n----------------------------------\n")

# Control the ongoing conversation flow by choosing candidate manually
new_candidate = chat.choose_candidate(index=1) # Choose the second candidate here
followup_response = await chat.send_message("Tell me more about it.")  # Will generate contents based on the chosen candidate
print(new_candidate, followup_response, sep="\n----------------------------------\n")
```
qutritium 0.0.1
Qutritium package provides basic calibration and features for qutrit system using Qiskit and other quantum packages
License: MIT License
Requires Python: >=3.6

&nbsp;

<div align="center">
<img src="project_images/csm_ritsch_slider_796236face.jpg" width=150%>

<div style="color: aquamarine" href="https://www.oeaw.ac.at/detail/news/qutrit-complex-quantum-teleportation-achieved-for-the-first-time-1"><b>IMAGE REFERENCE</b></div>

[![Unitary Fund](https://img.shields.io/badge/Supported%20By-UNITARY%20FUND-brightgreen.svg?style=for-the-badge)](https://unitary.fund)
# Qutritium
</div>

## What is Qutritium?
It is a Python package that provides qutrit processing techniques such as calibration and decomposition, etc (not exclusive).

Qutritium enables students researchers to run a qutrit system on available quantum computers which mainly comes from IBM cloud quantum computers.

## 📦 Installation

**Qutritium** runs in python environment. User can download newest python released **[here](https://www.python.org/downloads/)**.\
Recommendation: **[Anaconda](https://www.anaconda.com/products/distribution)** for environment separation

```bash
  pip install qutritium
```

## ✅ Qutritium Available Functions

| Protocol        | Purpose and functionalities |
|-----------------|-----------------------------|
| Calibration     | ...                         |
| Virtual Machine | ...                         |
 | Decomposition   | ...                         | 

## ✍️ Usage/Examples

```python
from qutritium.calibration import TR01

```

## 👥 Authors

- **[Son Pham](https://github.com/spham1611)**
- **[Tien Nguyen](https://github.com/ngdnhtien)**
- **[Bao Bach](https://github.com/bachbao)**

## 🧾License

[MIT License](LICENSE.txt)


## 📌 Documentation

[Documentation](https://spham1611.github.io/qutritium/)