Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLM: Add llm subsystem #51

Merged
merged 9 commits into from
Feb 12, 2024
Merged

LLM: Add llm subsystem #51

merged 9 commits into from
Feb 12, 2024

Conversation

Hialus
Copy link
Member

@Hialus Hialus commented Feb 10, 2024

Very rough draft for early review

Motivation

For Pyris V2 we need a robust and extendable subsystem for handling LLMs. This system will support different LLM selection strategies in the future, which are all accessible through the same Interface.

Description

Class Diagram:
ClassDiagram

Explanation:

  • The RequestHandlerInterface is the entrypoint / Facade for the entire subsystem
  • The BasicRequestHandler is the first simple implementation of it, which simply forwards to one specified LLM
  • In the future different request handlers would implement different logic for switching between multiple LLMs
  • An IrisMessage is our own message format, which we can then convert to/from e.g. Langchain messages
    • Currently only has role and text, but in the near future also supports images and possibly more
  • The LlmManager is a singleton, which stores/handles all the different LLMs
  • The different LlmWrapperInterfaces and their implementations are the direct connection to the LLMs and handle any vendor specific logic (i.e. converting messages)

There is also the follow up #52 to improve the config file parsing

@Hialus Hialus self-assigned this Feb 10, 2024
@Hialus Hialus marked this pull request as ready for review February 11, 2024 15:38
Copy link
Contributor

@kaancayli kaancayli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. LGTM

@Hialus Hialus added this to the 1.0.0-Prototype milestone Feb 11, 2024
@yassinsws
Copy link
Contributor

yassinsws commented Feb 12, 2024

For Futur's work, maybe change the model to enum

@Hialus
Copy link
Member Author

Hialus commented Feb 12, 2024

For Futur's work, maybe change the model to enum

This is not possible, as it is an identifier from a config fille. The model identifier is therefore dynamic

Copy link
Contributor

@yassinsws yassinsws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me for a first Version, approved !

@Hialus Hialus merged commit 94f786a into main Feb 12, 2024
1 check passed
@Hialus Hialus deleted the feature/llm-subsystem-v1 branch February 12, 2024 10:44
isabellagessl pushed a commit that referenced this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants