-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdf markdown runtime herlp #1082
Conversation
The changes in GIT_DIFF introduce a new function Analysis:
Concerns:
Suggestions: To improve robustness and efficiency, consider the following:
@@ -228,6 +228,10 @@ export async function cast(
? { text, data: res.json }
: { text, error: res.error?.message }
}
+
+try {
+ // Parallel processing of pages
+ const markdowns = await Promise.all(pages.map(async (page, i) => {
+ // ... existing code ...
+ }));
+} catch (error) {
+ console.error("Error during PDF conversion:", error);
+}
|
@@ -2749,6 +2749,7 @@ Base system prompt | |||
system({ title: "Base system prompt" }) | |||
$`## Markdown Output | |||
Respond in Markdown (GitHub Flavored Markdown also supported).` | |||
if (/o3/.test(env.meta.model)) $`Formatting re-enabled.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a typo here. Did you mean to use /o3/.test(env.meta.model)
instead of /o3/.test(env.meta.model)
?
AI-generated content by pr-docs-review-commit
typo
may be incorrect
|
||
## Advice on prompting | ||
|
||
OpenAI provides an extensive [advice on prompting](https://platform.openai.com/docs/guides/reasoning#advice-on-prompting) reasoning models. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing header for new section "Advice on prompting". Consider adding a brief description or summary.
AI-generated content by pr-docs-review-commit
missing_header
may be incorrect
@@ -2749,6 +2749,7 @@ Base system prompt | |||
system({ title: "Base system prompt" }) | |||
$`## Markdown Output | |||
Respond in Markdown (GitHub Flavored Markdown also supported).` | |||
if (/o3/.test(env.meta.model)) $`Formatting re-enabled.` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary condition check for env.meta.model
. Ensure this is necessary and remove if not.
AI-generated content by pr-docs-review-commit
unnecessary_condition
may be incorrect
markdownifyPdf
to convert PDF content into markdown. 📄➡️📝mdpdf.genai.mjs
that demonstrates how to use themarkdownifyPdf
function. 💬🔍cast
function with additional functionality for processing PDFs and generating markdown. 💼🔄