gpt4 book ai didi

python - openai.error.InvalidRequestError : Engine not found

转载 作者:行者123 更新时间:2023-12-02 05:46:08 24 4
gpt4 key购买 nike

尝试访问 OpenAPI 示例 - Explain code但它显示错误为 -

InvalidRequestError: Engine not found

enter code response = openai.Completion.create(
engine="code-davinci-002",
prompt="class Log:\n def __init__(self, path):\n dirname = os.path.dirname(path)\n os.makedirs(dirname, exist_ok=True)\n f = open(path, \"a+\")\n\n # Check that the file is newline-terminated\n size = os.path.getsize(path)\n if size > 0:\n f.seek(size - 1)\n end = f.read(1)\n if end != \"\\n\":\n f.write(\"\\n\")\n self.f = f\n self.path = path\n\n def log(self, event):\n event[\"_event_id\"] = str(uuid.uuid4())\n json.dump(event, self.f)\n self.f.write(\"\\n\")\n\n def state(self):\n state = {\"complete\": set(), \"last\": None}\n for line in open(self.path):\n event = json.loads(line)\n if event[\"type\"] == \"submit\" and event[\"success\"]:\n state[\"complete\"].add(event[\"id\"])\n state[\"last\"] = event\n return state\n\n\"\"\"\nHere's what the above class is doing:\n1.",
temperature=0,
max_tokens=64,
top_p=1.0,
frequency_penalty=0.0,
presence_penalty=0.0,
stop=["\"\"\""]
)

最佳答案

我一直在尝试访问名为 code-davinci-002 的引擎,它是 private beta version engine .因此,如果没有访问权限,就无法访​​问引擎。好像只有GPT-3模型是公共(public)使用的。我们需要加入OpenAI Codex Private Beta Waitlist以便通过 API 访问 Codex 模型。

关于python - openai.error.InvalidRequestError : Engine not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71597547/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com