Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

输出图像的Prompt格式 #6

Closed
wizd opened this issue Oct 27, 2023 · 1 comment
Closed

输出图像的Prompt格式 #6

wizd opened this issue Oct 27, 2023 · 1 comment

Comments

@wizd
Copy link

wizd commented Oct 27, 2023

我有观察到Prompt文档显示如何生成图像,如下所示。请问【image】是随意写个占位符就行了是吗?

...
plt.axis('equal')
plt.axis('off')
plt.show()

<|observation|>
```result
【image】

<|assistant|>
这是一个爱心形状。我使用了参数方程来描述这个形状,并使用matplotlib进行了绘制。如果您有任何其他需求或问题,请随时告诉我。
<|user|> # End

@Btlmd
Copy link
Member

Btlmd commented Oct 28, 2023

这个例子想要表达的是,如果判断 Interpreter 的执行结果为图片,则规定在这一轮的 observation 为字符串 [Image] ,用于表示 Interpreter 返回了一张图片。具体处理逻辑可以参考 Demo 中对 Code Interpreter 中图像的处理,如 https://github.com/THUDM/ChatGLM3/blob/main/composite_demo/demo_ci.py#L306-L311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants