Closed Faisal-Alsrheed closed 1 month ago
Hi @MarkDaoust :)
Let me know if you would like me to split this into multiple PRs.
Wait I need to look at that TODO before merging this.
The one in the permission_types? I should submit it in a separate PR.
@Faisal-Alsrheed thank you for the typos and other fixes :)
The one in the permission_types? I should submit it in a separate PR.
No I meant the one at the end of the PR description.
I think this is good to submit.
General Updates
Documentation and Error Messages: Improved clarity and accuracy in documentation and error messages across multiple files. This includes providing more descriptive error messages and consistent usage examples to help developers better understand code functionalities and constraints.
Typo Corrections: Fixed typos in comments and function names, notably correcting
get_dafault_permission_client
toget_default_permission_client
and its asynchronous counterpart inclient.py
andtypes/permission_types.py
. These changes prevent potential bugs and improve overall code quality.Specific File Changes
generative_models.py
:'models/gemini-pro'
), aligning with changes inmodels.py
.models.py
:tunedModels/
from theget_model
function. Now, model fetching is uniformly handled under themodels/
prefix, reducing complexity.models/
ortunedModels/
), aiding in quicker debugging and error resolution.answer.py
:client.py
:get_dafault_permission_client
toget_default_permission_client
and similarly for the async client functions. This correction is critical for preventing potential misconfigurations and ensuring the accuracy of function calls.types/permission_types.py
:notebook/text_model_test.py
:unittest
vspytest
I noticed discrepancies in the number of tests discovered when using
unittest
andpytest
.When running our test suite with
unittest
using the command:python -m unittest discover -s /workspaces/generative-ai-python/tests
unittest reported that it ran 603 tests.However, when we ran the same test suite with pytest using the command:
pytest /workspaces/generative-ai-python/tests
pytest reported that it collected and ran 607 tests.TODO:
I have broken down
test_generate_text
innotebook/text_model_test.py
for better debugging. beacuse after usingpytest
i got thisThe
call_model
method of theTestModel
class seems to be returning these values as strings, which is causing the tests to fail.Please review the changes and provide any additional feedback.
Thank You! 😊