-
Notifications
You must be signed in to change notification settings - Fork 43
Add FileParserPlugin example for Effect AI #52
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
base: 04-prompt-caching-effect
Are you sure you want to change the base?
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4bef188 to
2ab1077
Compare
2ab1077 to
1e16343
Compare
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.
Pull Request Overview
This PR adds a comprehensive FileParserPlugin example for Effect AI, demonstrating how to process PDF files using OpenRouter's file parser plugin with Effect's type-safe, composable architecture.
Key Changes:
- Adds Effect AI example with layer-based dependency injection and concurrent PDF processing
- Demonstrates proper file attachment handling using
Prompt.makePart('file', ...) - Implements Effect patterns including
Effect.gen, error handling withEffect.catchAll, and concurrent execution withEffect.all
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
typescript/effect-ai/src/plugin-file-parser/file-parser-all-sizes.ts |
Main example demonstrating FileParserPlugin with Effect AI patterns for processing multiple PDF sizes concurrently |
typescript/effect-ai/src/plugin-file-parser/README.md |
Documentation explaining the Effect AI integration features and usage instructions |
Comments suppressed due to low confidence (1)
typescript/effect-ai/src/plugin-file-parser/file-parser-all-sizes.ts:30
- Unused import getPdfPath.
import {
type PdfSize,
PDF_SIZES,
extractCode,
formatSize,
getPdfPath,
getPdfSize,
readExpectedCode,
readPdfAsDataUrl,
} from '@openrouter-examples/shared/fixtures';
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
typescript/effect-ai/src/plugin-file-parser/file-parser-all-sizes.ts
Outdated
Show resolved
Hide resolved
typescript/effect-ai/src/plugin-file-parser/file-parser-all-sizes.ts
Outdated
Show resolved
Hide resolved
typescript/effect-ai/src/plugin-file-parser/file-parser-all-sizes.ts
Outdated
Show resolved
Hide resolved
Add Effect AI example that demonstrates PDF processing using: - Effect.gen for effect composition - Layer-based dependency injection - Type-safe error handling - Shared fixtures module for PDF test files No PDF fixtures included - these should be inherited from pdf-example-fetch in the stack.
1e16343 to
9c1f09c
Compare
e069c8d to
25cbe98
Compare
louisgv
left a comment
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.
This example turned into super complex here? -- I think we need a simple example still.

Add FileParserPlugin example for AI SDK v5
Add shared fixtures module and JSON metadata
Fix stylecheck issues in AI SDK examples
Add FileParserPlugin example for Effect AI
Update Effect AI example to use shared fixtures module