Skip to content

Conversation

@Ki-Seki
Copy link
Member

@Ki-Seki Ki-Seki commented Nov 24, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 24, 2025 08:18
Copy link
Contributor

Copilot AI left a 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.py demonstrating 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

Comment on lines +7 to +10
client = OpenAI(
api_key="***",
base_url="https://openrouter.ai/api/v1",
)
Copy link

Copilot AI Nov 24, 2025

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).

Copilot uses AI. Check for mistakes.
)
model = from_openai(client, model_name="qwen/qwen3-235b-a22b")

cv_content = ""
Copy link

Copilot AI Nov 24, 2025

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:

  1. Include sample CV text content, or
  2. Show how to load CV content from a file, or
  3. 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.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,71 @@
from openai import OpenAI
Copy link

Copilot AI Nov 24, 2025

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:

  1. A module-level docstring describing what the example does
  2. 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.

Copilot uses AI. Check for mistakes.
@Ki-Seki Ki-Seki linked an issue Nov 24, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: add some real-world examples

2 participants