Skip to main content

qianfan

Model Square

Python SDK

install

pip install qianfan

Create an applicationand and if you do obtain the application key

import os
import qianfan

os.environ["QIANFAN_ACCESS_KEY"] = "xx"
os.environ["QIANFAN_SECRET_KEY"] = "xx"

emb = qianfan.Embedding()

resp = emb.do(
model="bge-large-zh",
texts=["世界上最高的山"],
)
print(resp["data"][0]["embedding"])

Embedding

ModelModel that supports preset services (using Model Parameter)
Embedding-V1
bge-large-zh
bge-large-en
tao-8k

Re-Ranker

bce-reranker-base is a cross-lingual semantic representation Algorithm Model developed by NetEase, Inc Youdao, Inc. It is good at optimizing semantic Searching results and correlation order refinement. It supports four Gate: Chinese, English, Japanese and South Korea, Coverage common business Domain, and supports long package rerank(512~ 32k).

Text that needs to be reordered, description: (1) It cannot be an empty List, and each member of the List cannot be an empty string. (2) Quantity of text shall not exceed 64 (3) The text length of each document shall not exceed 4096 characters. If the number of tokens exceeds 1024, it will be truncated.

usage statistics