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

Commit

Permalink
chore: doc string layout
Browse files Browse the repository at this point in the history
  • Loading branch information
dsdanielpark committed Aug 9, 2023
1 parent 8221054 commit 9b75f04
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bardapi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_answer(self, input_text: str) -> dict:
Get an answer from the Bard API for the given input text.
Example:
>>> token = 'xxxxxxxxxx'
>>> token = 'xxxxxx'
>>> bard = Bard(token=token)
>>> response = bard.get_answer("나와 내 동년배들이 좋아하는 뉴진스에 대해서 알려줘")
>>> print(response['content'])
Expand Down Expand Up @@ -239,7 +239,7 @@ def speech(self, input_text: str, lang="en-US") -> dict:
Get speech audio from Bard API for the given input text.
Example:
>>> token = 'xxxxxxxxxx'
>>> token = 'xxxxxx'
>>> bard = Bard(token=token)
>>> audio = bard.speech("hello!")
>>> with open("bard.ogg", "wb") as f:
Expand Down Expand Up @@ -295,7 +295,7 @@ def export_conversation(self, bard_answer, title: str = ""):
Get Share URL for specific answer from bard
Example:
>>> token = 'xxxxxxxxxx'
>>> token = 'xxxxxx'
>>> bard = Bard(token=token)
>>> bard_answer = bard.get_answer("hello!")
>>> url = bard.export_conversation(bard_answer, title="Export Conversation")
Expand Down Expand Up @@ -364,7 +364,7 @@ def ask_about_image(self, input_text: str, image: bytes, lang: str = None) -> di
Send Bard image along with question and get answer
Example:
>>> token = 'xxxxxxxxxx'
>>> token = 'xxxxxx'
>>> bard = Bard(token=token)
>>> image = open('image.jpg', 'rb').read()
>>> bard_answer = bard.ask_about_image("what is in the image?", image)['content']
Expand Down Expand Up @@ -529,7 +529,7 @@ def export_replit(
Get Export URL to repl.it from code
Example:
>>> token = 'xxxxxxxxxx'
>>> token = 'xxxxxx'
>>> bard = Bard(token=token)
>>> bard_answer = bard.get_answer("code python to print hello world")
>>> url = bard.export_replit(bard_answer['code'], bard_answer['langCode'])
Expand Down

0 comments on commit 9b75f04

Please sign in to comment.