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

LLMs: Add strategy LLM #16

Merged
merged 16 commits into from
Oct 6, 2023
Merged

LLMs: Add strategy LLM #16

merged 16 commits into from
Oct 6, 2023

Conversation

Hialus
Copy link
Member

@Hialus Hialus commented Sep 24, 2023

Motivation

We want to ensure a high availability of Pyris. For this, a fail-over system would be helpful.

Description

This PR adds a strategy llm class for guidance. This class is able to switch between other LLM implementations dynamically. For this, it acts partially as a proxy to the other LLMs, while taking over certain areas to select the LLM to use before each call.
The strategy it uses is this:

  1. Check which models support the currently required context length
  2. Check which models are currently available
  3. Select the first remaining LLM
    • If no LLM remains, take the one with the biggest context length
  4. Execute the call with the LLM
  5. If the call fails try again with the second LLM (if available)

This PR also adjusted some other parts of Pyris to support this new structure.

@Hialus Hialus self-assigned this Sep 24, 2023
@Hialus Hialus temporarily deployed to Iris Test September 24, 2023 23:29 — with GitHub Actions Inactive
@Hialus Hialus temporarily deployed to Iris Test September 25, 2023 14:27 — with GitHub Actions Inactive
@Hialus Hialus temporarily deployed to Iris Test September 25, 2023 23:39 — with GitHub Actions Inactive
@Hialus Hialus temporarily deployed to Iris Test September 25, 2023 23:59 — with GitHub Actions Inactive
@Hialus Hialus temporarily deployed to Iris Test September 26, 2023 00:08 — with GitHub Actions Inactive
@Hialus Hialus temporarily deployed to Iris Test September 26, 2023 00:15 — with GitHub Actions Inactive
@Hialus Hialus force-pushed the feature/strategy_llm branch from 8cf3f3f to 2a1ff18 Compare September 26, 2023 14:50
@Hialus Hialus merged commit ca33d8e into main Oct 6, 2023
2 checks passed
@Hialus Hialus deleted the feature/strategy_llm branch October 6, 2023 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant