Giter Club home page Giter Club logo

Comments (4)

surisdi avatar surisdi commented on August 20, 2024

Hi, Codex was discontinued by OpenAI. You can try using the chat versions (gpt3-turbo or gpt4) instead.

from viper.

shivanshpatel35 avatar shivanshpatel35 commented on August 20, 2024

Hi,
I changed the model here. But it still gets stuck at the same point here. Little bit of debugging leads to the following error log:

This model's maximum context length is 4097 tokens. However, you requested 4423 tokens (3911 in the messages, 512 in the completion). Please reduce the length of the messages or completion.

Do you have any suggestions on how to avoid this? My query is of reasonable length with 12 words.

from viper.

surisdi avatar surisdi commented on August 20, 2024

Hi,

The problem is that gpt-3.5-turbo has a context size of 4097, which is half the context size that Codex (code-davinci-002) had. The solution for now is to remove the video part of the prompt (VideoSegment class). Or, if you want to work with videos, remove functions from ImagePatch that are not required for your application. We implemented the former in the chatapi.prompt file. In order to use it, change this line (note that this is the default now).

chatapi.prompt is also required when working with chat versions of GPT independently of the context size, because the completion does not work as well (it is not a completion model, but a chat model), so it needs to be prompted slightly differently. We did not test this prompt/model, so you may have to play a bit with the prompt.

from viper.

shivanshpatel35 avatar shivanshpatel35 commented on August 20, 2024

Removing VideoSegment from prompts/api.prompt solves the issue. Thanks!

from viper.

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.