All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.dashscope.threads.runs.StepDetailBase Maven / Gradle / Ivy

There is a newer version: 2.16.9
Show newest version
package com.alibaba.dashscope.threads.runs;

import com.alibaba.dashscope.common.TypeRegistry;
import lombok.Data;

@Data
public class StepDetailBase {
  private static final TypeRegistry stepDetailRegistry = new TypeRegistry<>();

  protected static synchronized void registerStepDetail(
      String type, Class clazz) {
    stepDetailRegistry.register(type, clazz);
  }

  public static synchronized Class getStepDetailClass(String type) {
    return stepDetailRegistry.get(type);
  }

  static {
    registerStepDetail("message_creation", StepMessageCreation.class);
    registerStepDetail("tool_calls", StepToolCalls.class);
  }

  private String type;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy