Skip to content

Commit

Permalink
fix: use a cheaper and more appropriate OpenAI model
Browse files Browse the repository at this point in the history
  • Loading branch information
timrogers committed Jul 30, 2023
1 parent fd9a464 commit b5895db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/commands/submit-claim.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const attemptToinferCategoryAndBenefit = async (opts) => {
const categoryNames = categoriesWithBenefits.flatMap((category) => category.subcategory_alias ?? category.subcategory_name);
const content = `Your job is to predict the category for an expense claim based on the name of the merchant and a description of what was purchased. You should give a single, specific answer without any extra words or punctuation.\n\nHere are the possible categories:\n\n${categoryNames.join('\n')}\n\nPlease predict the category for the following example claim:\nMerchant: ${opts.merchant}\nDescription:${opts.description}`;
const chatCompletion = await openai.createChatCompletion({
model: 'gpt-3.5-turbo-16k',
model: 'gpt-3.5-turbo',
messages: [
{
role: 'user',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/submit-claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const attemptToinferCategoryAndBenefit = async (opts: {
}\nDescription:${opts.description}`;

const chatCompletion = await openai.createChatCompletion({
model: 'gpt-3.5-turbo-16k',
model: 'gpt-3.5-turbo',
messages: [
{
role: 'user',
Expand Down

0 comments on commit b5895db

Please sign in to comment.