Skip to content
Discussion options

You must be logged in to vote

Thanks Danny.

So I found the thing in ChatGPTClient.js. I modified the code to this to accepts dif max tokens per model selected. That did it.

const crypto = require('crypto');
const Keyv = require('keyv');
const { encoding_for_model: encodingForModel, get_encoding: getEncoding } = require('tiktoken');
const { fetchEventSource } = require('@waylaidwanderer/fetch-event-source');
const { Agent, ProxyAgent } = require('undici');
const BaseClient = require('./BaseClient');

const CHATGPT_MODEL = 'gpt-3.5-turbo';
const tokenizersCache = {};

class ChatGPTClient extends BaseClient {
  constructor(apiKey, options = {}, cacheOptions = {}) {
    super(apiKey, options, cacheOptions);

    cacheOpti…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@danny-avila
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by grexzen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #1074 on October 19, 2023 14:02.