Skip to content

Commit

Permalink
Feat/6725 can not get image url from cogview tool (#6728)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywoola authored Jul 26, 2024
1 parent 83af503 commit 90d2c01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/core/tools/provider/builtin/cogview/tools/cogview3.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def _invoke(self,
if not prompt:
return self.create_text_message('Please input prompt')
# get size
print(tool_parameters.get('prompt', 'square'))
size = size_mapping[tool_parameters.get('size', 'square')]
# get n
n = tool_parameters.get('n', 1)
Expand Down Expand Up @@ -58,8 +57,9 @@ def _invoke(self,
result = []
for image in response.data:
result.append(self.create_image_message(image=image.url))
result.append(self.create_text_message(
f'\nGenerate image source to Seed ID: {seed_id}'))
result.append(self.create_json_message({
"url": image.url,
}))
return result

@staticmethod
Expand Down

0 comments on commit 90d2c01

Please sign in to comment.