linrrzqqq commented on code in PR #67673:
URL: https://github.com/apache/doris/pull/67673#discussion_r4059142303
##########
be/src/exprs/function/ai/embed.h:
##########
@@ -94,6 +108,14 @@ class FunctionEmbed : public AIFunction<FunctionEmbed> {
static FunctionPtr create() { return std::make_shared<FunctionEmbed>(); }
private:
+ static bool _has_complete_resource_properties(std::string_view endpoint,
+ std::string_view
provider_type,
+ std::string_view model_name,
+ std::string_view api_key) {
+ return !endpoint.empty() && !provider_type.empty() &&
!model_name.empty() &&
+ (provider_type == "LOCAL" || !api_key.empty());
Review Comment:
无关
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/ai/Embed.java:
##########
@@ -119,11 +124,19 @@ private static String requireStringLiteral(Expression
arg, String argName, Strin
return value;
}
- private static void validateAIResource(String resourceName) {
+ private static void validateAIResource(String resourceName, boolean
isMultimodal) {
Resource resource =
Env.getCurrentEnv().getResourceMgr().getResource(resourceName);
if (!(resource instanceof AIResource)) {
throw new AnalysisException("AI resource '" + resourceName + "'
does not exist");
}
+ AIResource aiResource = (AIResource) resource;
+ boolean hasSupportedProperties =
aiResource.hasCompleteEmbedProperties()
Review Comment:
dismiss
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]