CHATSAM / test /test_generations_url.py
HouYunFei
增加图片管理、日志管理,优化敏感词等场景
8b3a6eb
Raw
History Blame Contribute Delete
429 Bytes
from test.utils import post_json
def main() -> None:
result = post_json(
"/v1/images/generations",
{
"prompt": "一只橘猫坐在窗边,午后阳光,写实摄影",
"model": "gpt-image-2",
"n": 1,
"response_format": "url",
},
)
for item in result.get("data", []):
print(item.get("url", ""))
if __name__ == "__main__":
main()