-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add CV parser example #147
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: main
Are you sure you want to change the base?
Conversation
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 new example demonstrating CV (curriculum vitae) parsing using gimkit's structured text generation capabilities. The example shows how to extract structured information from a CV using masked tags and JSON output format with the OpenRouter API.
Key Changes
- Added
examples/cv_parser.pydemonstrating extraction of CV fields including personal info, education history, and academic metrics - Uses JSON output type for structured data extraction
- Demonstrates complex nested structures (educational history list) with gimkit
| client = OpenAI( | ||
| api_key="***", | ||
| base_url="https://openrouter.ai/api/v1", | ||
| ) |
Copilot
AI
Nov 24, 2025
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.
Hard-coded API keys, even when masked, should be avoided in example code. This sets a bad precedent for users. Consider using environment variables instead:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("OPENAI_API_KEY"),
base_url="https://openrouter.ai/api/v1",
)This approach is consistent with other examples in the repository (see examples/hello_world.py which uses environment variables).
| ) | ||
| model = from_openai(client, model_name="qwen/qwen3-235b-a22b") | ||
|
|
||
| cv_content = "" |
Copilot
AI
Nov 24, 2025
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.
The cv_content variable is an empty string, which makes this example non-functional. For a CV parser example to be useful, it should either:
- Include sample CV text content, or
- Show how to load CV content from a file, or
- Include a comment explaining that users should replace this with their own CV content
Consider adding a docstring at the top of the file explaining the example's purpose and how to use it.
| @@ -0,0 +1,71 @@ | |||
| from openai import OpenAI | |||
Copilot
AI
Nov 24, 2025
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 lacks documentation explaining its purpose and usage. Consider adding:
- A module-level docstring describing what the example does
- Comments explaining the key parts (e.g., the extraction fields structure, the model call)
Other examples in the repository (e.g., examples/gimkit_quickstart.py) include helpful section headers and comments that guide users through the code.
No description provided.