Enable ZhiPu AI ITs only on ZHIPU_AI_API_KEY env present
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
package org.springframework.ai.zhipuai.embedding;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
|
||||
|
||||
import org.springframework.ai.embedding.EmbeddingResponse;
|
||||
import org.springframework.ai.zhipuai.ZhiPuAiEmbeddingModel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -29,6 +31,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* @author Geng Rong
|
||||
*/
|
||||
@SpringBootTest
|
||||
@EnabledIfEnvironmentVariable(named = "ZHIPU_AI_API_KEY", matches = ".+")
|
||||
class EmbeddingIT {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -81,7 +81,8 @@ public class VectorStoreChatMemoryAdvisor extends AbstractChatMemoryAdvisor<Vect
|
||||
|
||||
var searchRequest = SearchRequest.query(request.userText())
|
||||
.withTopK(this.doGetChatMemoryRetrieveSize(context))
|
||||
.withFilterExpression(DOCUMENT_METADATA_CONVERSATION_ID + "=='" + this.doGetConversationId(context) + "'");
|
||||
.withFilterExpression(
|
||||
"'" + DOCUMENT_METADATA_CONVERSATION_ID + "'=='" + this.doGetConversationId(context) + "'");
|
||||
|
||||
List<Document> documents = this.getChatMemoryStore().similaritySearch(searchRequest);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user