fix: strip v1 from tokenize endpoint since it uses base URL not v1 API
This commit is contained in:
parent
5364b6c446
commit
04b062f3f8
1 changed files with 2 additions and 2 deletions
|
|
@ -307,7 +307,7 @@ export async function countTokensWithUpstream(text, model) {
|
|||
const { getSelectedModel, getSelectedModelEndpoint } = await import("./models.js");
|
||||
|
||||
try {
|
||||
const endpoint = getSelectedModelEndpoint();
|
||||
const endpoint = getSelectedModelEndpoint().replace('/v1', '');
|
||||
console.log(`Trying tokenization at: ${endpoint}/tokenize`);
|
||||
|
||||
const response = await fetch(`${endpoint}/tokenize`, {
|
||||
|
|
@ -359,7 +359,7 @@ export async function getTokenCount(text, model) {
|
|||
const { getSelectedModel, getSelectedModelEndpoint } = await import("./models.js");
|
||||
|
||||
try {
|
||||
const endpoint = getSelectedModelEndpoint();
|
||||
const endpoint = getSelectedModelEndpoint().replace('/v1', '');
|
||||
console.log(`Trying tokenization at: ${endpoint}/tokenize`);
|
||||
|
||||
const response = await fetch(`${endpoint}/tokenize`, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue