MyGit

0.3.5

kyegomez/tree-of-thoughts

版本发布时间: 2023-07-30 03:02:48

kyegomez/tree-of-thoughts最新发布版本:0.3.6(2023-07-30 03:10:01)

Changelog

  1. LangchainTOT Class Definition: Introduced the LangchainTOT class to encapsulate all operations related to the Tree of Thought (ToT) process. This class holds an instance of the language model, the problem description, the thought checker, and the list of thoughts.

  2. LangchainTOT Class Customization: Added optional parameters to the constructor of the LangchainTOT class for temperature, max_tokens, problem_description, model, and checker_class to make the class customizable. This allows for the customization of the language model and thought checker based on specific needs.

  3. LangchainTOT Class Error Handling: Incorporated error handling within the check_thoughts method of the LangchainTOT class. It now raises a ValueError if no thoughts have been added or if the problem description hasn't been set, improving the robustness of the code.

  4. MyChecker Class Polymorphism: Redefined the MyChecker class to make it more polymorphic and generalizable for any task. MyChecker now takes a validation function as a parameter, which defines how to check the validity of thoughts for a specific problem. This allows for the creation of checkers for any kind of problem, not just Sudoku.

  5. LangchainTOT Class Simplification: Simplified the initialization of the LangchainTOT class by removing the parameter configuration from the instantiation of the OpenAI class. The LangchainTOT class now automatically configures these parameters based on the constructor arguments.

  6. Code Cleanup: Cleaned up and debugged the code. Simplified the imports by using only the necessary ones. Reorganized the code for clarity and ease of understanding.

  7. Documentation: Provided a detailed documentation explaining how to use the LangchainTOT and MyChecker classes, and how to define a custom validation function.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-07-30发行的版本