-
Notifications
You must be signed in to change notification settings - Fork 65
Fix/docs and examples cleanup #296
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
Fix/docs and examples cleanup #296
Conversation
…bute names Changes: - Replace hardcoded API keys with environment variables in examples - Fix incorrect attribute references (eval_status -> status, error_status -> status) - Fix llm_text_3h.py: cls.prompt.content -> cls.prompt - Update documentation to use correct EvalDetail attributes - Standardize environment variable usage across all examples Files updated: - docs: artimuse, ats_resume_guide, document_ocr, factcheck_guide, hallucination_guide, etc. - examples: 3h, ats_resume, hallucination, factcheck, rag, and others
Replace hardcoded 'sk-5b3e85f25d214c3b9c79ea62eab41e35' API key with environment variables in all example files: - examples/ats_resume/sdk_resume_optimizer.py - examples/document_parser/document_parsing_quality_ocr.py - examples/factcheck/dataset_factcheck_evaluation.py - examples/llm_and_rule/llm_and_rule_mix.py - examples/llm_and_rule/llm_remote.py - examples/llm_and_rule/only_llm.py - examples/long_video/llm_generate_qa.py - examples/meta_rater/sdk_meta_rater_evaluation.py - examples/rag/sdk_rag_eval.py - examples/register/sdk_register_llm.py - examples/security/text_security_politics.py All files now use os.getenv() to read: - OPENAI_API_KEY for API key - OPENAI_BASE_URL for API URL - OPENAI_MODEL for model name
Summary of ChangesHello @Kylie-dot-s, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request undertakes a significant cleanup and refactoring effort, primarily standardizing the evaluation result object to Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request provides a great cleanup of documentation and examples, primarily to align with the new EvalDetail return type and to improve configuration handling in examples by using environment variables. The changes are well-executed and improve the codebase.
I have a few suggestions to further enhance consistency and maintainability:
- Simplifying some logic in
llm_text_3h.pyand removing magic numbers. - Standardizing environment variable names for API keys across all example files.
- Making file path handling in examples more robust.
- Simplify quality_name extraction in llm_text_3h.py by using class name directly - Replace ../../ relative paths with PROJECT_ROOT pattern in all examples - Use Path(__file__).parent.parent.parent for consistent project root detection
No description provided.