Class FallbackChatModelKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static ChatModel withFallback(ChatModel $self, ChatModel model, Function1<Throwable, Boolean> whenError)
      final static Llm withFallback(Llm $self, Llm fallbackTo, Function1<Throwable, Boolean> whenError) LLM that falls back to another LLM if the first one fails.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • withFallback

         final static Llm withFallback(Llm $self, Llm fallbackTo, Function1<Throwable, Boolean> whenError)

        LLM that falls back to another LLM if the first one fails.

        Parameters:
        fallbackTo - the LLM to fall back to if the first one fails