Skip to content

Commit d433f74

Browse files
committed
more tweaks to TEST_GAPIC_RAG_CORPUS
1 parent b171f9b commit d433f74

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tests/unit/vertex_rag/test_rag_constants_preview.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717

1818

1919
from google.cloud import aiplatform
20-
from google.cloud.aiplatform_v1beta1 import (
20+
from google.cloud.aiplatform_v1beta1.types import (
2121
GoogleDriveSource,
2222
ImportRagFilesConfig,
2323
ImportRagFilesRequest,
2424
ImportRagFilesResponse,
2525
JiraSource as GapicJiraSource,
2626
RagContexts,
2727
RagCorpus as GapicRagCorpus,
28+
RagEmbeddingModelConfig as GapicRagEmbeddingModelConfig,
2829
RagEngineConfig as GapicRagEngineConfig,
2930
RagFileChunkingConfig,
3031
RagFileParsingConfig,
@@ -36,9 +37,9 @@
3637
SharePointSources as GapicSharePointSources,
3738
SlackSource as GapicSlackSource,
3839
VertexAiSearchConfig as GapicVertexAiSearchConfig,
40+
api_auth,
41+
EncryptionSpec,
3942
)
40-
from google.cloud.aiplatform_v1beta1.types import api_auth
41-
from google.cloud.aiplatform_v1beta1.types import EncryptionSpec
4243
from vertexai.preview.rag import (
4344
ANN,
4445
Basic,
@@ -137,12 +138,10 @@
137138
name=TEST_RAG_CORPUS_RESOURCE_NAME,
138139
display_name=TEST_CORPUS_DISPLAY_NAME,
139140
description=TEST_CORPUS_DISCRIPTION,
140-
vector_db_config=GapicRagVectorDbConfig(
141-
rag_embedding_model_config=GapicRagVectorDbConfig.RagEmbeddingModelConfig(
142-
vertex_prediction_endpoint=GapicRagVectorDbConfig.RagEmbeddingModelConfig.VertexPredictionEndpoint(
143-
endpoint="projects/{}/locations/{}/publishers/google/models/textembedding-gecko".format(
144-
TEST_PROJECT, TEST_REGION
145-
)
141+
rag_embedding_model_config=GapicRagEmbeddingModelConfig(
142+
vertex_prediction_endpoint=GapicRagEmbeddingModelConfig.VertexPredictionEndpoint(
143+
endpoint="projects/{}/locations/{}/publishers/google/models/textembedding-gecko".format(
144+
TEST_PROJECT, TEST_REGION
146145
)
147146
)
148147
),

0 commit comments

Comments
 (0)