Open rbyh opened 3 months ago
To have Ellipsis create a Pull Request with the implementation, comment below with "LGTM". If you want to make changes to the plan, comment below starting with "replan" with suggestions.
In the 'data_transfer_models.py' file located in the '/edsl' directory, add a new method called describe() to our objects. This method should make an LLM call to get a description of the object. Use the DummyModel
class in /integration/test_langugage_model.py
as a reference for making the LLM call. Ensure that the method is documented with docstrings to explain its purpose, parameters, and usage.
In the 'testBase.py' file located in the '/tests/base' directory, add a new test method for the describe() method. This test method should mock the LLM responses directly within the class and assert the expected outputs. Use the unittest
framework, organize your tests into a class that inherits from unittest.TestCase
, prefix your test method with `test` to denote it as a test case, and include a variety of test types in your test class to cover different aspects of the functionality of the describe() method.
In the 'edsl/Base.py' file, update the search functionality to use the new describe() method. Specifically, modify the search
method in the PersistenceMixin
class to incorporate the describe()
method in the search operations. Ensure that the updated search functionality works as expected with the new describe() method and is consistent with the rest of the codebase.
Questions? Check out our documentation.
They already have a "help" method - and tbh, repr and str are supposed to fill this role. Would you be happy if we just made sure the help method looked good for all objects?
Our objects could have a .describe() — makes an LLM call to get a description of what this object is about. Very useful in itself, but also we can embed and use in search immediately