Skip to content

Commit

Permalink
s/caption/description
Browse files Browse the repository at this point in the history
Signed-off-by: mudler <[email protected]>
  • Loading branch information
mudler committed Aug 26, 2023
1 parent d1ae51a commit 8164190
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/discord/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def ingest(a, agent_actions={}, localagi=None):
def create_image(a, agent_actions={}, localagi=None):
q = json.loads(a)
logger.info(">>> creating image: ")
logger.info(q["caption"])
logger.info(q["description"])
size=f"{q['width']}x{q['height']}"
response = openai.Image.create(prompt=q["caption"], n=1, size=size)
response = openai.Image.create(prompt=q["description"], n=1, size=size)
image_url = response["data"][0]["url"]
image_name = download_image(image_url)
image_path = f"{PERSISTENT_DIR}{image_name}"
Expand Down Expand Up @@ -252,13 +252,13 @@ def search_duckduckgo(a, agent_actions={}, localagi=None):
"generate_picture": {
"function": create_image,
"plannable": True,
"description": 'For creating a picture, the assistant replies with "generate_picture" and a detailed caption, enhancing it with as much detail as possible.',
"description": 'For creating a picture, the assistant replies with "generate_picture" and a detailed description, enhancing it with as much detail as possible.',
"signature": {
"name": "generate_picture",
"parameters": {
"type": "object",
"properties": {
"caption": {
"description": {
"type": "string",
},
"width": {
Expand Down

0 comments on commit 8164190

Please sign in to comment.