Created
February 27, 2024 08:20
-
-
Save pontusab/34fd94a7e9e8f59bdf7a306b6649ee02 to your computer and use it in GitHub Desktop.
Process PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const completion = await io.openai.chat.completions.create("completion", { | |
model: "gpt-3.5-turbo", | |
messages: [ | |
{ | |
role: "system", | |
content: | |
"You are a invoice parser. From this invoice extract total amount, due date, issuer name, currency and transform currency value to currency code and return it as currency. Return the response in JSON format", | |
}, | |
{ | |
role: "user", | |
content: JSON.stringify(docs.at(0)?.pageContent), | |
}, | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment