style(endpoints.js): fix indentation and add semicolons

fix(tokenizer.js): add try-catch block and error handling
style(SetTokenDialog/index.jsx): fix typo in sentence
refactor(data-service.ts): change argument format to match server API
This commit is contained in:
Daniel Avila 2023-04-11 10:28:11 -04:00
parent e0d5e75e73
commit 5c5871afd8
4 changed files with 20 additions and 12 deletions

View file

@ -84,7 +84,7 @@ const SetTokenDialog = ({ open, onOpenChange, endpoint }) => {
)}
/>
<small className="text-red-600">
Your token will be send to the server, but we won't save it.
Your token will be sent to the server, but not saved.
</small>
{helpText?.[endpoint]}
</div>

View file

@ -66,5 +66,5 @@ export const getAIEndpoints = () => {
}
export const updateTokenCount = (text: string) => {
return request.post(endpoints.tokenizer(), {arg: {text}});
return request.post(endpoints.tokenizer(), {arg: text});
}