code-davinci-002 模型的回答多少有点出乎意料

2023-02-24 22:35:32 +08:00
 youthfire
最近在尝试 api 接口,一直用的是 text-davinci-003 模型,今天想试试看 code-davinci-002 ,一方面是因为政策上免费,一方面主要是个产生代码的专用接口。

纯粹是想走通,看看能否产出代码。给他的 prompt 是 Please help me write a program using Python as the programming language, PySimpleGUI as the user interface. Click a button with the text "Press Me", and when you click, a pop-up message box will say "Hello".

看看它能否快速给出代码,结果回答:"This is a very simple requirement, as long as you understand the most basic"

这是迟早要造反呀 : D
1218 次点击
所在节点    OpenAI
3 条回复
TabGre
2023-02-25 07:18:56 +08:00
你们是走那么调用 chatgpt 接口的?
lzghades
2023-02-25 15:00:26 +08:00
import PySimpleGUI as sg

# Create a window
layout = [ [sg.Text('Press Me')],
[sg.Button('Press Me')] ]

window = sg.Window('My Window', layout)

# Event Loop to process "events" and get the "values" of the inputs
while True:
event, values = window.read()
if event in (None, 'Exit'): # if user closes window or clicks cancel
break
elif event == 'Press Me':
sg.popup('Hello!')

window.close()


这个是我的回复。。。你怕是调了个假接口。。
youthfire
2023-02-25 16:25:35 +08:00
@lzghades #2 我也觉得是!在 playground 我看是正常的,接 api 就一顿乱回。是 prompt 要加#或者 /*之类的符号开始吗?我用的和 text 一样代码,只是换了 model_engine 而已。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/919014

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX