Class ChatCompletionTransformer

java.lang.Object
io.quarkiverse.langchain4j.openai.testing.internal.ChatCompletionTransformer
All Implemented Interfaces:
com.github.tomakehurst.wiremock.extension.Extension, com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformerV2

public class ChatCompletionTransformer extends Object implements com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformerV2
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
     
     
    static void
    setContent(String content)
    TODO: this is a total necessary because this piece of code is run by neither the same thread nor the same ClassLoader as OpenAiBaseTest so we use a system property in order to provide an easy way to access the common state.
    com.github.tomakehurst.wiremock.http.ResponseDefinition
    transform(com.github.tomakehurst.wiremock.stubbing.ServeEvent serveEvent)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformerV2

    applyGlobally
  • Constructor Details

    • ChatCompletionTransformer

      public ChatCompletionTransformer()
  • Method Details

    • transform

      public com.github.tomakehurst.wiremock.http.ResponseDefinition transform(com.github.tomakehurst.wiremock.stubbing.ServeEvent serveEvent)
      Specified by:
      transform in interface com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformerV2
    • getName

      public String getName()
      Specified by:
      getName in interface com.github.tomakehurst.wiremock.extension.Extension
    • setContent

      public static void setContent(String content)
      TODO: this is a total necessary because this piece of code is run by neither the same thread nor the same ClassLoader as OpenAiBaseTest so we use a system property in order to provide an easy way to access the common state. This is pretty terrible as it means we can't have multiple tests running in parallel.
    • clearContent

      public static void clearContent()