Skip to content

Latest commit

 

History

History
126 lines (82 loc) · 5.5 KB

README_en.md

File metadata and controls

126 lines (82 loc) · 5.5 KB
logo

License Supported Python versions Supported OSs

简体中文 | English


What is AppBuilder SDK?

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

How to install?

The latest version of Baidu AI Cloud Qianfan AppBuilder SDK is 0.8.0 (2024-06-07)

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

Quickly start your first AI native application!

  • 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

Code example

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)

Answer display

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:

Panorama of Baidu AI Cloud Qianfan AppBuilder SDK capability

wechat

User Documentation

Open source community and activities

AppBuilder-SDK WeChat Group QR Code

wechat

License

AppBuilder SDK follows the Apache 2.0 open source protocol.