GoogleCloudPlatform / GoogleCloudPlatform/generative-ai
[Bug]: Can't Create RAG Config because of wrong vertex_ai_search_config format
- Dominant language
- Jupyter Notebook
- Stars
- 17.7k
- Forks
- 4.5k
- Avg merge
- 12h 38m
- Merged PRs (30d)
- 42
Description
### File Name
gemini/rag-engine/rag_engine_vertex_ai_search.ipynb
### What happened?
When you get to the `Create RAG Config` session/title, after inputting a Display Name and Engine Name, the cell fails to run saying that `serving_config` must be of a peculiar format.
On fixing with Gemini, got a different error of region issues, but should use a different GCP Project in a different region to solve that
### Relevant log output
```shell
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/tmp/ipython-input-3598091713.py in ()
10 )
11
---> 12 rag_corpus = rag.create_corpus(
13 display_name=DISPLAY_NAME,
14 vertex_ai_search_config=vertex_ai_search_config,
1 frames~/.local/lib/python3.12/site-packages/vertexai/preview/rag/rag_data.py in create_corpus(display_name, description, corpus_type_config, embedding_model_config, vector_db, vertex_ai_search_config, backend_config, encryption_spec, timeout)
169
170 if vertex_ai_search_config:
--> 171 _gapic_utils.set_vertex_ai_search_config(
172 vertex_ai_search_config=vertex_ai_search_config,
173 rag_corpus=rag_corpus,
~/.local/lib/python3.12/site-packages/vertexai/preview/rag/utils/_gapic_utils.py in set_vertex_ai_search_config(vertex_ai_search_config, rag_corpus)
930 )
931 else:
--> 932 raise ValueError(
933 "serving_config must be of the format `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` or `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`"
934 )
ValueError: serving_config must be of the format `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}` or `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}`
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.