egain-api-python 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- egain_api_python/_version.py +3 -3
- egain_api_python/answers.py +26 -38
- egain_api_python/articlelists.py +10 -10
- egain_api_python/connectorssearchevents.py +4 -4
- egain_api_python/errors/gethealthop.py +33 -19
- egain_api_python/escalation.py +8 -8
- egain_api_python/export.py +6 -6
- egain_api_python/federatedsearchevent.py +2 -2
- egain_api_python/general.py +8 -8
- egain_api_python/guidedhelp.py +26 -26
- egain_api_python/health.py +2 -8
- egain_api_python/import_.py +56 -74
- egain_api_python/models/__init__.py +106 -95
- egain_api_python/models/aisearchop.py +6 -34
- egain_api_python/models/aisearchresponse.py +0 -4
- egain_api_python/models/answersrequest.py +0 -31
- egain_api_python/models/answersresponse.py +9 -11
- egain_api_python/models/articleaisearchresult.py +16 -45
- egain_api_python/models/articletype.py +3 -5
- egain_api_python/models/{getimportcontentop.py → cancelimportop.py} +3 -3
- egain_api_python/models/{createimportop.py → createimportjobop.py} +3 -3
- egain_api_python/models/{createimportvalidationop.py → createimportvalidationjobop.py} +3 -3
- egain_api_python/models/exportstatus.py +15 -8
- egain_api_python/models/getannouncementarticlesop.py +2 -2
- egain_api_python/models/getarticlelistdetailsop.py +2 -2
- egain_api_python/models/getarticlesintopicop.py +4 -4
- egain_api_python/models/getbestanswerop.py +6 -6
- egain_api_python/models/gethealthop.py +134 -7
- egain_api_python/models/{patchimportcontentvalidationop.py → getimportstatusop.py} +3 -3
- egain_api_python/models/getpopulararticlesop.py +4 -4
- egain_api_python/models/getrelatedarticlesop.py +2 -2
- egain_api_python/models/importstatus.py +116 -0
- egain_api_python/models/knowledgeexport.py +3 -5
- egain_api_python/models/referenceresponse.py +7 -23
- egain_api_python/models/retrievechunksop.py +6 -6
- egain_api_python/models/retrieveresponse.py +10 -12
- egain_api_python/models/searchresult.py +7 -23
- egain_api_python/populararticles.py +14 -14
- egain_api_python/portal_article.py +64 -64
- egain_api_python/portal_attachment.py +4 -4
- egain_api_python/portal_bookmark.py +6 -6
- egain_api_python/portal_suggestion.py +18 -18
- egain_api_python/portal_topic.py +8 -8
- egain_api_python/portal_userdetails.py +2 -2
- egain_api_python/portal_userprofile.py +4 -4
- egain_api_python/retrieve.py +22 -28
- egain_api_python/sdk.py +25 -24
- egain_api_python/sdkconfiguration.py +3 -4
- egain_api_python/search.py +24 -40
- egain_api_python/usermilestones.py +2 -2
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/METADATA +44 -78
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/RECORD +55 -57
- egain_api_python/models/resourcetype_parameter.py +0 -10
- egain_api_python/models/topicaisearchresult.py +0 -67
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/WHEEL +0 -0
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/licenses/LICENSE +0 -0
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/top_level.txt +0 -0
egain_api_python/search.py
CHANGED
@@ -15,14 +15,11 @@ class Search(BaseSDK):
|
|
15
15
|
*,
|
16
16
|
q: str,
|
17
17
|
portal_id: str,
|
18
|
-
|
18
|
+
filter_user_profile_id: Optional[str] = None,
|
19
19
|
language: Optional[models.LanguageCodeParameter] = None,
|
20
|
-
|
21
|
-
|
22
|
-
dollar_filter_exclude_topic_ids: Optional[List[str]] = None,
|
23
|
-
resource_type: Optional[models.ResourceTypeParameter] = None,
|
20
|
+
filter_tags: Optional[Dict[str, List[str]]] = None,
|
21
|
+
filter_topic_ids: Optional[List[str]] = None,
|
24
22
|
article_custom_additional_attributes: Optional[str] = None,
|
25
|
-
topic_custom_additional_attributes: Optional[str] = None,
|
26
23
|
pagenum: Optional[int] = 1,
|
27
24
|
pagesize: Optional[int] = 10,
|
28
25
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
@@ -32,18 +29,16 @@ class Search(BaseSDK):
|
|
32
29
|
) -> models.AISearchResponse:
|
33
30
|
r"""Get the best search results for a user query
|
34
31
|
|
35
|
-
|
32
|
+
The Search API is a hybrid search service that combines semantic understanding with keyword precision to deliver fast, contextual, and relevant results from your enterprise knowledge base. It enables secure, role-aware access to articles, FAQs, and documentation across customer, agent, and employee interfaces. Each query returns a ranked list of results with snippets, metadata, and relevance scores. <br>**This endpoint is only available for Self Service environments.**
|
33
|
+
|
36
34
|
|
37
35
|
:param q: The search query string. The string must be escaped as required by the URL syntax rules.
|
38
36
|
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
39
|
-
:param
|
37
|
+
:param filter_user_profile_id: The ID of the user profile.
|
40
38
|
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other. <br><br> If lang is not passed, then the portal's default language is used.
|
41
|
-
:param
|
42
|
-
:param
|
43
|
-
:param dollar_filter_exclude_topic_ids: An array of topic IDs that will be excluded from the search. It includes articles that belong to the topic.
|
44
|
-
:param resource_type: Type of resource to be fetched.
|
39
|
+
:param filter_tags: An object where each key is a **Category Tag ID** (numeric string), and each value is an array of **Tag IDs** for that category.
|
40
|
+
:param filter_topic_ids: An array of topic IDs. It is used to restrict search results to specific topics.
|
45
41
|
:param article_custom_additional_attributes: One or more comma-separated names for article custom attributes defined by the user to be returned.
|
46
|
-
:param topic_custom_additional_attributes: One or more comma-separated names for topic custom attributes defined by the user to be returned.
|
47
42
|
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
48
43
|
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
49
44
|
:param retries: Override the default retry configuration for this method
|
@@ -64,14 +59,11 @@ class Search(BaseSDK):
|
|
64
59
|
request = models.AiSearchRequest(
|
65
60
|
q=q,
|
66
61
|
portal_id=portal_id,
|
67
|
-
|
62
|
+
filter_user_profile_id=filter_user_profile_id,
|
68
63
|
language=language,
|
69
|
-
|
70
|
-
|
71
|
-
dollar_filter_exclude_topic_ids=dollar_filter_exclude_topic_ids,
|
72
|
-
resource_type=resource_type,
|
64
|
+
filter_tags=filter_tags,
|
65
|
+
filter_topic_ids=filter_topic_ids,
|
73
66
|
article_custom_additional_attributes=article_custom_additional_attributes,
|
74
|
-
topic_custom_additional_attributes=topic_custom_additional_attributes,
|
75
67
|
pagenum=pagenum,
|
76
68
|
pagesize=pagesize,
|
77
69
|
)
|
@@ -105,7 +97,7 @@ class Search(BaseSDK):
|
|
105
97
|
config=self.sdk_configuration,
|
106
98
|
base_url=base_url or "",
|
107
99
|
operation_id="aiSearch",
|
108
|
-
oauth2_scopes=
|
100
|
+
oauth2_scopes=None,
|
109
101
|
security_source=get_security_from_env(
|
110
102
|
self.sdk_configuration.security, models.Security
|
111
103
|
),
|
@@ -135,14 +127,11 @@ class Search(BaseSDK):
|
|
135
127
|
*,
|
136
128
|
q: str,
|
137
129
|
portal_id: str,
|
138
|
-
|
130
|
+
filter_user_profile_id: Optional[str] = None,
|
139
131
|
language: Optional[models.LanguageCodeParameter] = None,
|
140
|
-
|
141
|
-
|
142
|
-
dollar_filter_exclude_topic_ids: Optional[List[str]] = None,
|
143
|
-
resource_type: Optional[models.ResourceTypeParameter] = None,
|
132
|
+
filter_tags: Optional[Dict[str, List[str]]] = None,
|
133
|
+
filter_topic_ids: Optional[List[str]] = None,
|
144
134
|
article_custom_additional_attributes: Optional[str] = None,
|
145
|
-
topic_custom_additional_attributes: Optional[str] = None,
|
146
135
|
pagenum: Optional[int] = 1,
|
147
136
|
pagesize: Optional[int] = 10,
|
148
137
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
@@ -152,18 +141,16 @@ class Search(BaseSDK):
|
|
152
141
|
) -> models.AISearchResponse:
|
153
142
|
r"""Get the best search results for a user query
|
154
143
|
|
155
|
-
|
144
|
+
The Search API is a hybrid search service that combines semantic understanding with keyword precision to deliver fast, contextual, and relevant results from your enterprise knowledge base. It enables secure, role-aware access to articles, FAQs, and documentation across customer, agent, and employee interfaces. Each query returns a ranked list of results with snippets, metadata, and relevance scores. <br>**This endpoint is only available for Self Service environments.**
|
145
|
+
|
156
146
|
|
157
147
|
:param q: The search query string. The string must be escaped as required by the URL syntax rules.
|
158
148
|
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
159
|
-
:param
|
149
|
+
:param filter_user_profile_id: The ID of the user profile.
|
160
150
|
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other. <br><br> If lang is not passed, then the portal's default language is used.
|
161
|
-
:param
|
162
|
-
:param
|
163
|
-
:param dollar_filter_exclude_topic_ids: An array of topic IDs that will be excluded from the search. It includes articles that belong to the topic.
|
164
|
-
:param resource_type: Type of resource to be fetched.
|
151
|
+
:param filter_tags: An object where each key is a **Category Tag ID** (numeric string), and each value is an array of **Tag IDs** for that category.
|
152
|
+
:param filter_topic_ids: An array of topic IDs. It is used to restrict search results to specific topics.
|
165
153
|
:param article_custom_additional_attributes: One or more comma-separated names for article custom attributes defined by the user to be returned.
|
166
|
-
:param topic_custom_additional_attributes: One or more comma-separated names for topic custom attributes defined by the user to be returned.
|
167
154
|
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
168
155
|
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
169
156
|
:param retries: Override the default retry configuration for this method
|
@@ -184,14 +171,11 @@ class Search(BaseSDK):
|
|
184
171
|
request = models.AiSearchRequest(
|
185
172
|
q=q,
|
186
173
|
portal_id=portal_id,
|
187
|
-
|
174
|
+
filter_user_profile_id=filter_user_profile_id,
|
188
175
|
language=language,
|
189
|
-
|
190
|
-
|
191
|
-
dollar_filter_exclude_topic_ids=dollar_filter_exclude_topic_ids,
|
192
|
-
resource_type=resource_type,
|
176
|
+
filter_tags=filter_tags,
|
177
|
+
filter_topic_ids=filter_topic_ids,
|
193
178
|
article_custom_additional_attributes=article_custom_additional_attributes,
|
194
|
-
topic_custom_additional_attributes=topic_custom_additional_attributes,
|
195
179
|
pagenum=pagenum,
|
196
180
|
pagesize=pagesize,
|
197
181
|
)
|
@@ -225,7 +209,7 @@ class Search(BaseSDK):
|
|
225
209
|
config=self.sdk_configuration,
|
226
210
|
base_url=base_url or "",
|
227
211
|
operation_id="aiSearch",
|
228
|
-
oauth2_scopes=
|
212
|
+
oauth2_scopes=None,
|
229
213
|
security_source=get_security_from_env(
|
230
214
|
self.sdk_configuration.security, models.Security
|
231
215
|
),
|
@@ -78,7 +78,7 @@ class Usermilestones(BaseSDK):
|
|
78
78
|
config=self.sdk_configuration,
|
79
79
|
base_url=base_url or "",
|
80
80
|
operation_id="getUserMilestones",
|
81
|
-
oauth2_scopes=
|
81
|
+
oauth2_scopes=None,
|
82
82
|
security_source=get_security_from_env(
|
83
83
|
self.sdk_configuration.security, models.Security
|
84
84
|
),
|
@@ -182,7 +182,7 @@ class Usermilestones(BaseSDK):
|
|
182
182
|
config=self.sdk_configuration,
|
183
183
|
base_url=base_url or "",
|
184
184
|
operation_id="getUserMilestones",
|
185
|
-
oauth2_scopes=
|
185
|
+
oauth2_scopes=None,
|
186
186
|
security_source=get_security_from_env(
|
187
187
|
self.sdk_configuration.security, models.Security
|
188
188
|
),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: egain-api-python
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.4
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
5
5
|
Author: Speakeasy
|
6
6
|
Requires-Python: >=3.9.2
|
@@ -29,23 +29,36 @@ Knowledge Portal Manager APIs: ### License
|
|
29
29
|
The following licenses are required to use the Knowledge Access APIs:
|
30
30
|
* If the user is an agent, then the *Knowledge + AI* license is required.
|
31
31
|
* If the user is a customer, the *Self-Service* and *Advanced Self-Service* licenses must be available.
|
32
|
+
|
33
|
+
### Tiers
|
34
|
+
|
35
|
+
| Tier |Tier Name| Named Users | Description
|
36
|
+
| ---------- | ---------- | ---------- | ----------------------------
|
37
|
+
| Tier 1 | Starter | Up to 10| Designed for small-scale implementations or pilot environments
|
38
|
+
| Tier 2 | Growth | Up to 1000| Suitable for mid-scale deployments requiring moderate scalability
|
39
|
+
| Tier 3 | Enterprise | Greater than 1000| Supports large-scale environments with extended configuration options
|
40
|
+
|
32
41
|
### API Resource Limits
|
33
|
-
The following Resources have predefined limits for specific access attributes for Enterprise use.
|
34
|
-
|
35
|
-
| Resource |
|
36
|
-
| ---------------- | ---------------------------- | ----------
|
37
|
-
| Article Reference
|
38
|
-
| |Number of custom attributes in an article |
|
39
|
-
| |Number of publish views used in an article version | 20
|
40
|
-
| Topic Reference
|
41
|
-
| |Depth of topics | 20
|
42
|
-
| |Topics at any level | 2500
|
43
|
-
| |Number of custom attributes in a topic |
|
44
|
-
| Portal Reference
|
45
|
-
| |Topics to be included in a portal |
|
46
|
-
| |Number of articles to display in announcements | 25
|
47
|
-
| |
|
48
|
-
|
42
|
+
The following Resources have predefined limits for specific access attributes for Starter, Growth and Enterprise use.
|
43
|
+
|
44
|
+
| Resource | Limits | Starter | Growth | Enterprise
|
45
|
+
| ---------------- | ---------------------------- | ---------- | ---------- | ----------
|
46
|
+
| Article Reference |Number of attachments used in any article | 25 | 50 |50
|
47
|
+
| |Number of custom attributes in an article | 10 | 25| 50
|
48
|
+
| |Number of publish views used in an article version | 20 | 20 | 20
|
49
|
+
| Topic Reference |User-defined topics in a department| 1000| 5000 | 50000
|
50
|
+
| |Depth of topics | 5 | 20 | 20
|
51
|
+
| |Topics at any level | 500 | 2500 | 2500
|
52
|
+
| |Number of custom attributes in a topic | 10 | 10 | 10
|
53
|
+
| Portal Reference | Tag categories in a portal | 15 | 15 | 15
|
54
|
+
| |Topics to be included in a portal | 100 | 500 | 5000
|
55
|
+
| |Number of articles to display in announcements | 10 | 25 | 25
|
56
|
+
| |Usage links and link groups setup for a portal | 5 | 10 | 25
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
For more information about the API: [Full SDK Documentation](https://github.com/eGain/egain-api-python)
|
49
62
|
<!-- End Summary [summary] -->
|
50
63
|
|
51
64
|
<!-- Start Table of Contents [toc] -->
|
@@ -161,7 +174,7 @@ with Egain(
|
|
161
174
|
access_token=os.getenv("EGAIN_ACCESS_TOKEN", ""),
|
162
175
|
) as egain:
|
163
176
|
|
164
|
-
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000",
|
177
|
+
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000", filter_user_profile_id="PROD-3210", language="en-US", filter_tags={
|
165
178
|
"PROD-1234": [
|
166
179
|
"PROD-2000",
|
167
180
|
"PROD-2003",
|
@@ -193,7 +206,7 @@ async def main():
|
|
193
206
|
access_token=os.getenv("EGAIN_ACCESS_TOKEN", ""),
|
194
207
|
) as egain:
|
195
208
|
|
196
|
-
res = await egain.aiservices.retrieve.retrieve_chunks_async(q="fair lending", portal_id="PROD-1000",
|
209
|
+
res = await egain.aiservices.retrieve.retrieve_chunks_async(q="fair lending", portal_id="PROD-1000", filter_user_profile_id="PROD-3210", language="en-US", filter_tags={
|
197
210
|
"PROD-1234": [
|
198
211
|
"PROD-2000",
|
199
212
|
"PROD-2003",
|
@@ -233,7 +246,7 @@ with Egain(
|
|
233
246
|
access_token=os.getenv("EGAIN_ACCESS_TOKEN", ""),
|
234
247
|
) as egain:
|
235
248
|
|
236
|
-
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000",
|
249
|
+
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000", filter_user_profile_id="PROD-3210", language="en-US", filter_tags={
|
237
250
|
"PROD-1234": [
|
238
251
|
"PROD-2000",
|
239
252
|
"PROD-2003",
|
@@ -257,9 +270,6 @@ with Egain(
|
|
257
270
|
<details open>
|
258
271
|
<summary>Available methods</summary>
|
259
272
|
|
260
|
-
### [aiservices](docs/sdks/aiservices/README.md)
|
261
|
-
|
262
|
-
|
263
273
|
#### [aiservices.answers](docs/sdks/answers/README.md)
|
264
274
|
|
265
275
|
* [get_best_answer](docs/sdks/answers/README.md#get_best_answer) - Get the best answer for a user query
|
@@ -268,23 +278,16 @@ with Egain(
|
|
268
278
|
|
269
279
|
* [retrieve_chunks](docs/sdks/retrieve/README.md#retrieve_chunks) - Retrieve Chunks
|
270
280
|
|
271
|
-
### [content](docs/sdks/content/README.md)
|
272
|
-
|
273
|
-
|
274
281
|
#### [content.health](docs/sdks/health/README.md)
|
275
282
|
|
276
283
|
* [get_health](docs/sdks/health/README.md#get_health) - Check service health status
|
277
284
|
|
278
285
|
#### [content.import_](docs/sdks/import/README.md)
|
279
286
|
|
280
|
-
* [
|
281
|
-
* [
|
282
|
-
* [
|
283
|
-
* [
|
284
|
-
|
285
|
-
|
286
|
-
### [portal](docs/sdks/portalsdk/README.md)
|
287
|
-
|
287
|
+
* [create_import_job](docs/sdks/import/README.md#create_import_job) - Import content from external sources by creating an import job
|
288
|
+
* [get_import_status](docs/sdks/import/README.md#get_import_status) - Get the current status of an import or validation job
|
289
|
+
* [create_import_validation_job](docs/sdks/import/README.md#create_import_validation_job) - Validate content structure and format before import by creating an import validation job
|
290
|
+
* [cancel_import](docs/sdks/import/README.md#cancel_import) - Cancel an import or validation job
|
288
291
|
|
289
292
|
#### [portal.article](docs/sdks/portalarticle/README.md)
|
290
293
|
|
@@ -454,7 +457,7 @@ with Egain(
|
|
454
457
|
access_token=os.getenv("EGAIN_ACCESS_TOKEN", ""),
|
455
458
|
) as egain:
|
456
459
|
|
457
|
-
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000",
|
460
|
+
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000", filter_user_profile_id="PROD-3210", language="en-US", filter_tags={
|
458
461
|
"PROD-1234": [
|
459
462
|
"PROD-2000",
|
460
463
|
"PROD-2003",
|
@@ -484,7 +487,7 @@ with Egain(
|
|
484
487
|
access_token=os.getenv("EGAIN_ACCESS_TOKEN", ""),
|
485
488
|
) as egain:
|
486
489
|
|
487
|
-
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000",
|
490
|
+
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000", filter_user_profile_id="PROD-3210", language="en-US", filter_tags={
|
488
491
|
"PROD-1234": [
|
489
492
|
"PROD-2000",
|
490
493
|
"PROD-2003",
|
@@ -529,7 +532,7 @@ with Egain(
|
|
529
532
|
res = None
|
530
533
|
try:
|
531
534
|
|
532
|
-
res = egain.content.import_.
|
535
|
+
res = egain.content.import_.create_import_job(data_source={
|
533
536
|
"type": "AWS S3 bucket",
|
534
537
|
"path": "s3://mybucket/myfolder/",
|
535
538
|
"region": "us-east-1",
|
@@ -586,43 +589,6 @@ with Egain(
|
|
586
589
|
<!-- Start Server Selection [server] -->
|
587
590
|
## Server Selection
|
588
591
|
|
589
|
-
### Server Variables
|
590
|
-
|
591
|
-
The default server `https://${API_DOMAIN}/knowledge/portalmgr/v4` contains variables and is set to `https://$api.egain.cloud/knowledge/portalmgr/v4` by default. To override default values, the following parameters are available when initializing the SDK client instance:
|
592
|
-
|
593
|
-
| Variable | Parameter | Default | Description |
|
594
|
-
| ------------ | ----------------- | ------------------- | ----------- |
|
595
|
-
| `API_DOMAIN` | `api_domain: str` | `"api.egain.cloud"` | |
|
596
|
-
|
597
|
-
#### Example
|
598
|
-
|
599
|
-
```python
|
600
|
-
from egain_api_python import Egain
|
601
|
-
import os
|
602
|
-
|
603
|
-
|
604
|
-
with Egain(
|
605
|
-
api_domain="<value>"
|
606
|
-
access_token=os.getenv("EGAIN_ACCESS_TOKEN", ""),
|
607
|
-
) as egain:
|
608
|
-
|
609
|
-
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000", dollar_filter_user_profile_id="PROD-3210", language="en-US", dollar_filter_tags={
|
610
|
-
"PROD-1234": [
|
611
|
-
"PROD-2000",
|
612
|
-
"PROD-2003",
|
613
|
-
],
|
614
|
-
"PROD-2005": [
|
615
|
-
"PROD-2007",
|
616
|
-
],
|
617
|
-
}, channel={
|
618
|
-
"name": "Eight Bank Website",
|
619
|
-
})
|
620
|
-
|
621
|
-
# Handle response
|
622
|
-
print(res)
|
623
|
-
|
624
|
-
```
|
625
|
-
|
626
592
|
### Override Server URL Per-Client
|
627
593
|
|
628
594
|
The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
|
@@ -632,11 +598,11 @@ import os
|
|
632
598
|
|
633
599
|
|
634
600
|
with Egain(
|
635
|
-
server_url="https://$
|
601
|
+
server_url="https://${API_DOMAIN}/knowledge/portalmgr/v4",
|
636
602
|
access_token=os.getenv("EGAIN_ACCESS_TOKEN", ""),
|
637
603
|
) as egain:
|
638
604
|
|
639
|
-
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000",
|
605
|
+
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000", filter_user_profile_id="PROD-3210", language="en-US", filter_tags={
|
640
606
|
"PROD-1234": [
|
641
607
|
"PROD-2000",
|
642
608
|
"PROD-2003",
|
@@ -665,7 +631,7 @@ with Egain(
|
|
665
631
|
access_token=os.getenv("EGAIN_ACCESS_TOKEN", ""),
|
666
632
|
) as egain:
|
667
633
|
|
668
|
-
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000",
|
634
|
+
res = egain.aiservices.retrieve.retrieve_chunks(q="fair lending", portal_id="PROD-1000", filter_user_profile_id="PROD-3210", language="en-US", filter_tags={
|
669
635
|
"PROD-1234": [
|
670
636
|
"PROD-2000",
|
671
637
|
"PROD-2003",
|
@@ -675,7 +641,7 @@ with Egain(
|
|
675
641
|
],
|
676
642
|
}, channel={
|
677
643
|
"name": "Eight Bank Website",
|
678
|
-
}, server_url="https://$
|
644
|
+
}, server_url="https://${API_DOMAIN}/core/aiservices/v4")
|
679
645
|
|
680
646
|
# Handle response
|
681
647
|
print(res)
|