Giter Club home page Giter Club logo

Comments (4)

QAbot-zh avatar QAbot-zh commented on May 26, 2024

使用的oneapi版本和gemini模型是什么,我没有复现出来,提供一下你的请求内容看看 ?

image

from one-api.

IAn2018cs avatar IAn2018cs commented on May 26, 2024

使用的oneapi版本和gemini模型是什么,我没有复现出来,提供一下你的请求内容看看 ?

image

oneapi 用的 main 分支最新的代码:1c2654320e5b6268b13b6efca40ce37a523d032b
gemini 用的 1.5 pro

请求是没问题,问题是流式响应里,第一条没有返回 role 信息,我 role 解析成 null 了,
然后再去添加到 messages 里,role 的值成 null,就报错了

from one-api.

QAbot-zh avatar QAbot-zh commented on May 26, 2024

嗯确实算一个bug
gpt 能返回role参数
image
gemini 不能返回role参数
image
(话说为什么要根据响应的role来解析呢,理论上响应的内容不就肯定是assistant了吗哈哈)

from one-api.

IAn2018cs avatar IAn2018cs commented on May 26, 2024

嗯确实算一个bug gpt 能返回role参数 image gemini 不能返回role参数 image (话说为什么要根据响应的role来解析呢,理论上响应的内容不就肯定是assistant了吗哈哈)

因为这样就能直接根据响应结果,拼到 message 列表里😂,不过我在自己程序里已经兼容处理这种情况了

from one-api.

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.