Skip to content

Commit

Permalink
fix llm client thread safety (#3731)
Browse files Browse the repository at this point in the history
fixes #3719
  • Loading branch information
yuluo-yx committed May 20, 2024
1 parent f0bb69b commit 4300772
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;

/**
* @author yuluo
Expand All @@ -69,27 +70,31 @@
public class TongYiAutoConfiguration {

@Bean
@Scope("prototype")
@ConditionalOnMissingBean
public Generation generation() {

return new Generation();
}

@Bean
@Scope("prototype")
@ConditionalOnMissingBean
public MessageManager msgManager() {

return new MessageManager(10);
}

@Bean
@Scope("prototype")
@ConditionalOnMissingBean
public ImageSynthesis imageSynthesis() {

return new ImageSynthesis();
}

@Bean
@Scope("prototype")
@ConditionalOnMissingBean
public SpeechSynthesizer speechSynthesizer() {

Expand Down

0 comments on commit 4300772

Please sign in to comment.