Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
vsakkas committed Nov 22, 2023
1 parent 6cf32c9 commit 31f2552
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Python Client for Bard, a Chat Based AI tool by Google.
## Features

- Connect to Bard, Google's AI-powered personal assistant.
- Ask questions and have a continuous conversation.
- Ask questions and have a conversation in various tones.
- Use asyncio for efficient and non-blocking I/O operations.

## Requirements
Expand Down Expand Up @@ -135,6 +135,27 @@ async with BardClient() as bard:
print(response)
```


### Tone

You can set the tone when having a conversation with Bard:

```python
async with BardClient() as bard:
_ = await bard.ask("When was Bard released?")

response = await bard.ask("When was Bard released?", tone="Professional")
print(response)
```

The available options for the `tone` parameter are:
- `Professional`
- `Casual`

> [!NOTE]
> It is recommended to use the `tone` parameter on subsequent prompts and not in the first one. This is because this feature is typically used to change the previous response, rather than define the entire conversation tone.

### Exceptions

When something goes wrong, Sydney.py might throw one of the following exceptions:
Expand All @@ -143,6 +164,7 @@ When something goes wrong, Sydney.py might throw one of the following exceptions
|-------------------------------|-------------------------------------------|--------------------------|
| `CreateConversationException` | Failed to create conversation | Retry or use new cookies |
| `AskException` | Failed to get response from Bard | Retry or use new cookies |
| `NoResponseException` | Received an empty response from Bard | Wait and retry |

*For more detailed documentation and options, please refer to the code docstrings.*

Expand Down

0 comments on commit 31f2552

Please sign in to comment.