googleapis / googleapis/google-cloud-python

[Discovery Engine] RelevanceScoreSpec missing in google.cloud.discoveryengine_v1alpha

Đang mở
#14,959 2 bình luận 0 reaction 1 người được giao Được @daniel-sanche nhận Xem trên GitHub
api: discoveryengine type: bug type: process
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
122

Mô tả

### Determine this is the right repository

- [x] I determined this is the correct repository in which to report this bug.

### Summary of the issue

**Context**
I am currently working with the Google Cloud Discovery Engine Python client. I noticed that the RelevanceScoreSpec class is missing from the v1alpha module (google.cloud.discoveryengine_v1alpha), whereas it is present and functioning correctly in the stable v1 module (google.cloud.discoveryengine_v1).

This issue complicates the implementation when I need to use other alpha-only features, such as NaturalLanguageQueryUnderstandingSpec. Since those features are not available in v1, I am currently forced to mix imports from both v1 and v1alpha to use them together. This leads to redundant and messy code.

**Expected Behavior:**
RelevanceScoreSpec should be available in google.cloud.discoveryengine_v1alpha just as it is in google.cloud.discoveryengine_v1.

**Actual Behavior:**
The code raises an AttributeError when accessing the class in v1alpha.

### API client name and version

google-cloud-discoveryengine v0.15.0

### Reproduction steps: code

file: main.py
```python
from google.cloud import discoveryengine_v1
from google.cloud import discoveryengine_v1alpha

# 1. This works as expected
try:
spec_v1 = discoveryengine_v1.SearchRequest.RelevanceScoreSpec()
print("v1: RelevanceScoreSpec found.")
except AttributeError:
print("v1: RelevanceScoreSpec NOT found.")

# 2. This raises an AttributeError
try:
spec_alpha = discoveryengine_v1alpha.SearchRequest.RelevanceScoreSpec()
print("v1alpha: RelevanceScoreSpec found.")
except AttributeError as e:
print(f"v1alpha: Failed - {e}")
```

### Reproduction steps: supporting files

_No response_

### Reproduction steps: actual results

1. Install google-cloud-discoveryengine.
2. Attempt to import or access RelevanceScoreSpec from both v1 and v1alpha.

### Reproduction steps: expected results

1. Install google-cloud-discoveryengine.
2. Attempt to import or access RelevanceScoreSpec from both v1 and v1alpha.

### OS & version + platform

macOS 14.8.1

### Python environment

Python 3.12.7

### Python dependencies

Package Version
---------------------------- ----------
cachetools 6.2.2
certifi 2025.11.12
charset-normalizer 3.4.4
google-api-core 2.28.1
google-auth 2.43.0
google-cloud-discoveryengine 0.15.0
googleapis-common-protos 1.72.0
grpcio 1.76.0
grpcio-status 1.76.0
idna 3.11
proto-plus 1.26.1
protobuf 6.33.2
pyasn1 0.6.1
pyasn1-modules 0.4.2
requests 2.32.5
rsa 4.9.1
typing-extensions 4.15.0
urllib3 2.6.1

### Additional context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.