MCPcopy Create free account
hub / github.com/53AI/53AIHub / CallEmbeddingAPIWithModel

Method CallEmbeddingAPIWithModel

api/service/rag/embedding.go:399–402  ·  view source on GitHub ↗

CallEmbeddingAPIWithModel 调用embedding API (指定模型) - 保持向后兼容

(content string, channel *model.Channel, modelName string, ctx *EmbeddingContext)

Source from the content-addressed store, hash-verified

397
398// CallEmbeddingAPIWithModel 调用embedding API (指定模型) - 保持向后兼容
399func (s *EmbeddingService) CallEmbeddingAPIWithModel(content string, channel *model.Channel, modelName string, ctx *EmbeddingContext) ([]float64, error) {
400 // 调用新版本方法,传递 0,0 表示不检查停止信号
401 return s.CallEmbeddingAPIWithModelWithStop(content, channel, modelName, ctx.GetLibraryID(), ctx.GetFileID())
402}
403
404// isNonRetryableError 判断是否是不可重试的错误
405func (s *EmbeddingService) isNonRetryableError(err error) bool {

Callers 4

testEmbeddingChannelFunction · 0.95
ProcessChunkEmbeddingMethod · 0.95
callEmbeddingAPIMethod · 0.95

Calls 3

GetFileIDMethod · 0.80
GetLibraryIDMethod · 0.45

Tested by

no test coverage detected