This project is mirrored from https://github.com/aurelio-labs/semantic-router.
Pull mirroring updated .
- Feb 13, 2024
-
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
Saving Layer Configs as JSON or YAML config files by representing the LayerConfig object as a dict and then turning into JSON/YAML wasn't working. See issue here: https://github.com/aurelio-labs/semantic-router/issues/144 The issue was that, by attempting this, we were attempting to serialize all objects included in the Layer, including Routes, and the LLMs that those Routes use. In the case of the above issue, the LLM was a Cohere one, which included a Client as one of its attributes, and this Client is not serializable. So, instead of attempting to represent the entire LLM object a dict, to then be converted into JSON/YAML, we only keep key information about the LLM: 'module': self.llm.__module__, 'class': self.llm.__class__.__name__, 'model': self.llm.name This is what's saved in route.py, and then sent to layer.py to be serialized (in LayerConfig.to_file()). Then, when it comes time to load from the file via LayerConfig.from_file, the LLM is re-initialized dynamically.
-
- Feb 12, 2024
-
-
dwmorris11 authored
-
dwmorris11 authored
-
dwmorris11 authored
installed poetry and ran make. added mistralai to the pyproject.toml (first time using poetry, nice tool)
-
- Feb 11, 2024
-
-
dwmorris11 authored
the __call__ method of the Zure class to make it more informative
-
dwmorris11 authored
new encoder and a new LLMS. The encoder is a simple wrapper around the MistralAI API, and the LLMS is a simple wrapper around the encoder. The encoder is tested with a simple unit test, and the LLMS is tested with a simple unit test.
-
- Feb 05, 2024
-
-
Siraj R Aizlewood authored
-
James Briggs authored
-
James Briggs authored
-
James Briggs authored
-
- Feb 04, 2024
-
-
James Briggs authored
-
- Feb 01, 2024
-
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
Changes to the code meant we needed to change some pytests. New pytests added for Conversation splitter method. Also fixed a bug in cumulative_sim.py where we weren't limiting curr_split_docs to only latter docs after a split.
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
We need to figure out how to check if first two messages belong to the same topic before implementing. At the moment they code is written such that the first two messages automatically are sorted into the same topic.
-
Siraj R Aizlewood authored
This was required to fix a bug where the first two mesasges were always assigned the same class.
-
Siraj R Aizlewood authored
The splitting code needed tidying and docstrings. Delegated tasks in split_by_topic() to newly created methods to reduce number of lines of code in split_by_topic().
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
The split_by_topic was adding the last message from the previous splitting to the current splitting output, resulting in duplicates. I also made the code more readable. Also moved Conversation from schema.py to text.py to avoid cyclic imports.
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
Also commented out splitter code in Conversation class temporarily due to circular reference.
-
- Jan 31, 2024
-
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
Ensured that splitters embed in the __call__ method, rather than on initialization. Also updated the Conversation class to uttilize splitters in assigning topic ids to Messages as the list of Messages grows.
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
The code was largely copied from splitters.py. We now have code for the consecutive similarity splitter as well as the cumulative similarity splitter.
-
Siraj R Aizlewood authored
-
- Jan 29, 2024
-
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
-
Siraj R Aizlewood authored
list_route_names for checking current route names. remove for removing route and its associated data..
-
- Jan 28, 2024
-
-
James Briggs authored
-
James Briggs authored
-
James Briggs authored
-
- Jan 27, 2024
-
-
James Briggs authored
-
James Briggs authored
-
- Jan 26, 2024
-
-
James Briggs authored
-