WebKnowledgeSourceParams Class

Specifies runtime parameters for a web knowledge source.

Constructor

WebKnowledgeSourceParams()

Variables

Name Description
knowledgeSourceName
str

The name of the index the params apply to. Required.

includeReferences

Indicates whether references should be included for data retrieved from this source.

includeReferenceSourceData

Indicates whether references should include the structured data obtained during retrieval in their payload.

alwaysQuerySource

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

failOnError

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

rerankerThreshold

The reranker threshold all retrieved documents must meet to be included in the response.

maxOutputDocuments
int

Limits the maximum number of documents returned from this knowledge source.

kind
Literal[KnowledgeSourceKind.WEB]

The discriminator value. Required. A knowledge source that reads data from the web.

language
str

The language of the web results.

market
str

The market of the web results.

count
int

The number of web results to return.

freshness
str

The freshness of web results.

Methods

clear
copy
fromkeys

Create a new dictionary with keys from iterable and values set to value.

get

Return the value for key if key is in the dictionary, else default.

items
keys
pop

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

setdefault

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

update

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values

clear

clear() -> None.  Remove all items from D.

copy

copy() -> a shallow copy of D

fromkeys

Create a new dictionary with keys from iterable and values set to value.

fromkeys(value=None, /)

Positional-Only Parameters

Name Description
iterable
Required
value
Default value: None

get

Return the value for key if key is in the dictionary, else default.

get(key, default=None, /)

Positional-Only Parameters

Name Description
key
Required
default
Default value: None

items

items() -> a set-like object providing a view on D's items

keys

keys() -> a set-like object providing a view on D's keys

pop

If the key is not found, return the default if given; otherwise, raise a KeyError.

pop(k, [d]) -> v, remove specified key and return the corresponding value.

popitem

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

popitem()

setdefault

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

setdefault(key, default=None, /)

Positional-Only Parameters

Name Description
key
Required
default
Default value: None

update

If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

update([E], **F) -> None.  Update D from mapping/iterable E and F.

values

values() -> an object providing a view on D's values

Attributes

alwaysQuerySource

Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.

alwaysQuerySource: bool

count

The number of web results to return.

count: int

failOnError

Indicates that the entire retrieval request should fail if retrieval from this knowledge source encounters an error. Defaults to false.

failOnError: bool

freshness

The freshness of web results.

freshness: str

includeReferenceSourceData

Indicates whether references should include the structured data obtained during retrieval in their payload.

includeReferenceSourceData: bool

includeReferences

Indicates whether references should be included for data retrieved from this source.

includeReferences: bool

kind

The discriminator value. Required. A knowledge source that reads data from the web.

kind: WEB: 'web'>]

knowledgeSourceName

The name of the index the params apply to. Required.

knowledgeSourceName: str

language

The language of the web results.

language: str

market

The market of the web results.

market: str

maxOutputDocuments

Limits the maximum number of documents returned from this knowledge source.

maxOutputDocuments: int

rerankerThreshold

The reranker threshold all retrieved documents must meet to be included in the response.

rerankerThreshold: float