Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Setting max_tokens didn't work when using OpenAI models. #4721

Closed
1 of 3 tasks
SirlyDreamer opened this issue May 17, 2024 · 1 comment
Closed
1 of 3 tasks

[Bug] Setting max_tokens didn't work when using OpenAI models. #4721

SirlyDreamer opened this issue May 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SirlyDreamer
Copy link

Bug Description

The payload of request didn't contains 'max_tokens'.

Steps to Reproduce

  1. Go to 'settings', and set max_tokens to any value.
  2. Open Chrome Developer Tools and switch to 'Network' tab.
  3. Apply a chat request.

Expected Behavior

The request should have key 'max_tokens'.

Screenshots

image

Deployment Method

  • Docker
  • Vercel
  • Server

Desktop OS

Windows 11

Desktop Browser

Chrome

Desktop Browser Version

124.0.6367.208

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@SirlyDreamer SirlyDreamer added the bug Something isn't working label May 17, 2024
@SpiralTower
Copy link

const requestPayload: RequestPayload = {
messages,
stream: options.config.stream,
model: modelConfig.model,
temperature: modelConfig.temperature,
presence_penalty: modelConfig.presence_penalty,
frequency_penalty: modelConfig.frequency_penalty,
top_p: modelConfig.top_p,
// max_tokens: Math.max(modelConfig.max_tokens, 1024),
// Please do not ask me why not send max_tokens, no reason, this param is just shit, I dont want to explain anymore.
};

#3208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants