construct_from_dict()
この操作は、辞書表現から Function オブジェクトを構築します。
リクエスト構文
python
construct_from_dict(
raw: dict
)
パラメーター:
-
raw(dict)collection schema を構築するための生データを含む辞書。
戻り値の型:
戻り値:
Function オブジェクト。
例外:
-
MilvusExceptionこの操作中に何らかのエラーが発生した場合、この例外が発生します。
例
python
from pymilvus import Function
function_dict = {
"name": "bm25",
"type": "BM25",
"input_field_names": ["text"],
"output_field_names": ["score"],
"description": "BM25 text search function",
}
function = Function.construct_from_dict(function_dict)
print(function)