Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/aurelio-labs/semantic-router. Pull mirroring updated .
  1. Apr 28, 2024
  2. Apr 26, 2024
  3. Feb 27, 2024
  4. Feb 19, 2024
  5. Feb 17, 2024
  6. Feb 13, 2024
    • Siraj R Aizlewood's avatar
      Linting. · 59600647
      Siraj R Aizlewood authored
      59600647
    • Siraj R Aizlewood's avatar
      Bug Fix Saving JSON/YAML of Layer Config · 8d2de77e
      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.
      8d2de77e
  7. Jan 26, 2024
  8. Jan 23, 2024
  9. Jan 22, 2024
  10. Jan 18, 2024
  11. Jan 16, 2024
  12. Jan 13, 2024
  13. Jan 12, 2024
  14. Jan 11, 2024
  15. Jan 10, 2024
  16. Jan 07, 2024
  17. Jan 06, 2024
  18. Jan 05, 2024
  19. Jan 02, 2024
  20. Dec 28, 2023
  21. Dec 27, 2023
  22. Dec 26, 2023
  23. Dec 20, 2023
  24. Dec 19, 2023
Loading