【发布时间】:2023-01-11 23:08:03
【问题描述】:
当我使用 GPT3 的 playground 时,我经常得到带有编号列表和段落格式的结果,如下所示:
Here's what the above class is doing:
1. It creates a directory for the log file if it doesn't exist.
2. It checks that the log file is newline-terminated.
3. It writes a newline-terminated JSON object to the log file.
4. It reads the log file and returns a dictionary with the following
- list 1
- list 2
- list 3
- list 4
但是,当我直接使用他们的 API 并从 json 结果中提取响应时,我得到了很难阅读的塞满文本版本,如下所示:
Here's what the above class is doing:1. It creates a directory for the log file if it doesn't exist.2. It checks that the log file is newline-terminated.3. It writes a newline-terminated JSON object to the log file.4. It reads the log file and returns a dictionary with the following-list 1-list 2-list 3- list4
我的问题是,人们如何保留 GPT 结果的格式,以便它们以更整洁、更易读的方式显示?
【问题讨论】:
标签: gpt-3