Giter VIP home page Giter VIP logo

Comments (8)

JiyuShao avatar JiyuShao commented on July 18, 2024 1

验证的还是报错:
image

image

正常的请求如下:
image

from bob-plugin-openai-translator.

liby avatar liby commented on July 18, 2024 1

已经更新了 https://github.com/openai-translator/bob-plugin-openai-translator/releases/tag/v2.2.3

from bob-plugin-openai-translator.

JiyuShao avatar JiyuShao commented on July 18, 2024 1

可以了

from bob-plugin-openai-translator.

liby avatar liby commented on July 18, 2024

试试 https://github.com/openai-translator/bob-plugin-openai-translator/releases/tag/v2.2.1

from bob-plugin-openai-translator.

liby avatar liby commented on July 18, 2024

又更新了一版,https://github.com/openai-translator/bob-plugin-openai-translator/releases/tag/v2.2.2

from bob-plugin-openai-translator.

JiyuShao avatar JiyuShao commented on July 18, 2024

一样的问题,应该是 POST Body 的格式不对
https://github.com/openai-translator/bob-plugin-openai-translator/blob/v2.2.2/src/main.js#L366

Body 下面这个格式是失败的:
{"max_tokens":5,"prompt":"Once upon a time"}

Body 下面这个格式是成功的:
{"stream":true,"messages":[{"content":"You are a translation engine that can only translate text and cannot interpret it.","role":"system"},{"content":"translate from en to zh-Hans:\n\nOnce upon a time","role":"user"}],"frequency_penalty":1,"model":"gpt-3.5-turbo-16k","temperature":0.20000000000000001,"presence_penalty":1,"top_p":1,"max_tokens":1000}

from bob-plugin-openai-translator.

liby avatar liby commented on July 18, 2024

挺奇怪的,我是看着官方的 Example 是这样写的
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2023-05-15/examples/completions.json#L9

from bob-plugin-openai-translator.

JiyuShao avatar JiyuShao commented on July 18, 2024

挺奇怪的,我是看着官方的 Example 是这样写的 https://github.com/Azure/azure-rest-api-specs/blob/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2023-05-15/examples/completions.json#L9

  • 这个是 completion 的示例,Completions API 已经过时了
  • 代码里用的是 chat completion 的接口,所以应该参考这个 Example

from bob-plugin-openai-translator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.