简体中文 | English
Baidu AI Cloud Qianfan AppBuilder SDK is a one-stop development tool
for AI native application developers which contributed by Baidu AI Cloud Qianfan AppBuilder.
We provide three types of functions from bottom to top: basic components, process orchestration, and end-to-end applications. With Baidu AI Cloud Qianfan AppBuilder SDK, you can:
-
Cooperate with Baidu AI Cloud Qianfan AppBuilder platform web side, Build an end-to-end AI native application that includes Baidu's industrial practices at the minute level: Agent / RAG / Workflow application
-
Collaborate with basic components and process orchestration to build personalized
Assistant
+FunctionCall
applications in a modular manner -
Provide two service-oriented deployment methods: API calls and interactive windows, supporting fast cloud deployment
Baidu AI Cloud Qianfan AppBuilder SDK ReleaseNote please refer to our version description
- We recommend installing the latest stable version of
Python
python3 -m pip install --upgrade appbuilder-sdk
- For installation of
Java
andGo
versions, as well as usingDocker
images, please refer to the Installation Instructions
- Please install
appbuilder sdk
in a Python environment with>=3.9
and use this end-to-end application example - The example provides a trial token, but access and QPS are restricted. Please replace it with your personal token for official use
- The application in the example is: Geography expert, Click on the link to try it out on the web page
import appbuilder
import os
# Set the TOKENs in the environment. The following TOKENs are trial TOKENs with restricted access and QPS. Please replace them with your personal TOKENs for official use
os.environ["APPBUILDER_TOKEN"] = "bce-v3/ALTAK-n5AYUIUJMarF7F7iFXVeK/1bf65eed7c8c7efef9b11388524fa1087f90ea58"
# Obtain and pass in the application ID from the AppBuilder webpage. The following is the application ID of the Geography Expert
app_id = "42eb211a-14b9-43d2-9fae-193c8760ef26"
app_builder_client = appbuilder.AppBuilderClient(app_id)
conversation_id = app_builder_client.create_conversation()
answer = app_builder_client.run(conversation_id, "Where is the capital of the United States and what is the climate like? answer by english")
print(answer.content)
The capital of the United States is Washington, D.C.^[1]^.
The climate of Washington, D.C. is generally mild and wet, with hot summers and cold winters. The city experiences a high level of rainfall, especially in the spring and summer months. However, it also has a high level of sunshine and warm weather in the summer months.^[2]^
For more examples of AI native application code, please refer to CookBooks. We have the following cookbooks that we recommend you to read first:
- Basic Ability Components
- Process orchestration
- End-to-end applications
-
Github Issue: Submit installation/usage issues, report bugs, suggest new features, communicate development plans, etc
AppBuilder SDK follows the Apache 2.0 open source protocol.