forked from Archives/langchain
512c24fc9c
In the current solution, AgentType and AGENT_TO_CLASS are placed in two separate files and both manually maintained. This might cause inconsistency when we update either of them. — latest — based on the discussion with hwchase17, we don’t know how to further use the newly introduced AgentTypeConfig type, so it doesn’t make sense yet to add it. Instead, it’s better to move the dictionary to another file to keep the loading.py file clear. The consistency is a good point. Instead of asserting the consistency during linting, we added a unittest for consistency check. I think it works as auto unittest is triggered every time with clear failure notice. (well, force push is possible, but we all know what we are doing, so let’s show trust. :>) ~~This PR includes~~ - ~~Introduced AgentTypeConfig as the source of truth of all AgentType related meta data.~~ - ~~Each AgentTypeConfig is a annotated class type which can be used for annotation in other places.~~ - ~~Each AgentTypeConfig can be easily extended when we have more meta data needs.~~ - ~~Strong assertion to ensure AgentType and AGENT_TO_CLASS are always consistent.~~ - ~~Made AGENT_TO_CLASS automatically generated.~~ ~~Test Plan:~~ - ~~since this change is focusing on annotation, lint is the major test focus.~~ - ~~lint, format and test passed on local.~~ |
||
---|---|---|
.. | ||
agents | ||
callbacks | ||
chains | ||
data | ||
docstore | ||
document_loader | ||
evaluation | ||
llms | ||
memory | ||
output_parsers | ||
prompts | ||
retrievers | ||
tools | ||
utilities | ||
vectorstores | ||
__init__.py | ||
test_bash.py | ||
test_depedencies.py | ||
test_document_transformers.py | ||
test_formatting.py | ||
test_math_utils.py | ||
test_python.py | ||
test_schema.py | ||
test_sql_database_schema.py | ||
test_sql_database.py | ||
test_text_splitter.py |