mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 13:47:09 +00:00
[improvement](chat) Change llmparser to pyllm, retrieve LLMProxy from environment variables, defaulting to JavaLLMProxy. (#497)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.tencent.supersonic.common.util;
|
||||
|
||||
import java.util.Map;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@@ -76,6 +77,10 @@ public class ContextUtils implements ApplicationContextAware {
|
||||
return context;
|
||||
}
|
||||
|
||||
public static <T> Map<String, T> getBeansOfType(Class<T> requiredType) {
|
||||
return context.getBeansOfType(requiredType);
|
||||
}
|
||||
|
||||
public static String getActiveProfile() {
|
||||
String activeProfile = context.getEnvironment().getActiveProfiles()[0];
|
||||
if (StringUtils.isEmpty(activeProfile)) {
|
||||
|
||||
Reference in New Issue
Block a user