Closed hfguo02 closed 10 months ago
The selected model, GPT-3.5, cannot be used properly.
Did u try other models? can they work normally?
Same here, all models not working
Stack Trace
import{g as r}from"./utils.Xiu07ssm.js";async function m(n,e,o){const a=n.map(t=>({id:t.id,title:t.title,url:t.url})),s=e.map(t=>({type:t,tabIds:[]})),i=await r("model")||"gpt-3.5-turbo",c=await r("apiURL")||"https://api.openai.com/v1/chat/completions";try{return await Promise.all(a.map(async t=>{if(!t.url)return;const p=(await(await fetch(c,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`,"Api-Key":o},body:JSON.stringify({messages:[{role:"system",content:"You are a classificator"},{role:"user",content:`Based on the URL: "${t.url}" and title: "${t.title}", classify the browser tab type as one of the following: ${e.join(", ")}. Respond with only the classification keyword from the list.`}],model:i})})).json()).choices[0].message.content,l=e.indexOf(p);l!==-1&&s[l].tabIds.push(t.id)})),s}catch(t){return console.error(t),s}}async function f(n,e,o){try{const a=await r("model")||"gpt-3.5-turbo",s=await r("apiURL")||"https://api.openai.com/v1/chat/completions";return(await(await fetch(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`,"Api-Key":o},body:JSON.stringify({messages:[{role:"system",content:"You are a classificator"},{role:"user",content:`Based on the URL: "${n.url}" and title: "${n.title}", classify the browser tab type as one of the following: ${e.join(", ")}. Respond with only the classification keyword from the list.`}],model:a})})).json()).choices[0].message.content}catch(a){console.error(a)}}export{m as b,f as h};
Using openai alternative api, seems apiURL not read from options config.
It should be working, can u check the network in the Network panel?
no log in Network panel
You need to check in service_worker console
I think found the reason,I created my own Assistants ChatGPT 3.5-turbo model on OpenAI and am verifying if my key works.
I'm not sure if there is a necessary connection, but it is currently working fine.
cc: @GentlemanHu
Yes, maybe the config not saved if not close Options tab; after closing Options tab, my config works.
Description
checking the Chrome extensions reveals an error prompt.
Error log