Skip to Content

Free Baidu Qianfan ERNIE Bot API Access Tutorial Guide, Odoo Serves the Whole Company and Every Industry Through AI Interface Services

Table of contents

No titles in the blog post

Use Odoo and immediately have a full set of enterprise AI service platform. The whole process takes 1 minute to activate Baidu ERNIE Bot Smart Cloud Qianfan large model API, and 1 hour to complete integration and front-end chat interface development! 

ERNIE Bot has had open testing for a long time, and recently it has been fully officially launched, including image generation features. Developers can basically apply for free as long as they apply. We applied for Baidu ERNIE Bot testing very early. In comparison, it is smarter than Alibaba's, after all, it comes from a search engine background. Its intelligence is slightly inferior to ChatGPT, but its content is fresh and comprehensive. Qianfan also supports image generation interfaces and training interfaces, which is very powerful.

After the interfaces are opened, we can easily integrate and use one API to serve the entire company or industry customers. Like Alibaba Cloud, Baidu has integrated many large models, including even Stable Diffusion and Falcon. 



Tongyi Qianwen Integration with Odoo ERNIE Bot • One-stop enterprise-level large model platform, knowledge-enhanced large language model

Tongyi Qianwen Integration with Odoo

AI Robot Center

You can manage various large language models in a unified AI service center, integrate with OpenAI and Microsoft Azure's ChatGPT, integrate with Baidu ERNIE Bot, and integrate with Alibaba's Tongyi Qianwen. With simple configuration, you can add support for various AI large models in 1 minute. The functional modules are provided for free in Odoo.


Enterprise AI Operation Support

Enterprises can combine AI with existing business processes to automate sales processes, customer service processes, production processes, etc. Execute various AIGC tasks in batches with one click.


AI Low-Code Platform

Through the Odoo open-source market and Odoo standard open interfaces, AI functions can be quickly opened up to the enterprise's CRM customer marketing, supply chain, production, e-commerce, foreign trade ERP, and other areas.


Ready-made enterprise services such as AI SEO and AI e-commerce

Odoo Smart has completed the development of AI marketing, AI social media matrix, and other functions. Combined with the existing functions of Odoo's full-featured ERP, it can quickly integrate the enterprise's existing business with AI.


AI Project Collaboration Platform

Enterprises can create multi-user public channels and private channels for specified projects or topics, efficiently complete projects or specified content requirements through AI assistants, and execute various AIGC tasks in batches.


AI Service Billing System

All AI services count tokens and can be billed. On e-commerce platforms including WeChat Mini Programs and Douyin Mini Programs, the corresponding services are provided after payment.


AI Robot Center

Unified AI Service Center manages various large language models


AI Robot Center

Unified AI Service Center manages various large language models

Tongyi Qianwen Integration with Odoo


Enterprise AI Operation Support

Enterprises can integrate AI with existing business processes to automate sales workflows, customer service workflows, production processes, etc.

General business integration, such as sales:

Tongyi Qianwen Integration with Odoo

AI SAAS E-commerce Service

Tongyi Qianwen Integration with Odoo

AI Customer Service Robot

Website customer service robot with customizable processes.

Tongyi Qianwen Integration with Odoo

AI Low-Code Platform

In conjunction with the enterprise's existing ERP, use AI to assist in the enterprise's existing business operations.

Batch AIGC functions, global multilingual processing, standardized interface support.

Tongyi Qianwen Integration with Odoo


AI Project Collaboration Platform

Enterprises can create multi-user public channels and private channels for designated projects or topics,

Tongyi Qianwen Integration with Odoo

AI Global E-commerce Portal

Use AI multilingual translation and our Odoo automatic site cluster construction function to achieve quickly. Because AI translation has context, continuous integration processing is much more useful than ordinary translation engines.

Tongyi Qianwen Integration with Odoo

AI Service Billing System

Through our billing and statistics system, you can see the number of users and the amount of Tokens used by users. Combined with Odoo's e-commerce platform features, you can directly charge for AI services and provide and sell AI services in WeChat Mini Programs and Douyin/TikTok Mini Programs.

Tongyi Qianwen Integration with Odoo

AI Service Backend

We have open-sourced the Odoo AI Service Center module, which can be downloaded for free from the Odoo Chinese App Market or the official Odoo Market.

 Tongyi Qianwen Integration with Odoo

Tongyi Qianwen Integration with Odoo

AI WeChat and Douyin Mini Programs

Enterprise users can experience it on WeChat, Douyin, and QQ, with direct voice input.

 Tongyi Qianwen Integration with Odoo



Baidu Qianfan Integration Process

See the Results First - Baidu Qianfan AI

Let's look at the results first: integration developed and completed in 1 hour, based on our existing odoo Ai service center. Fully released through odoo free open source.

Tongyi Qianwen Integration with Odoo


Chat with AI


Tongyi Qianwen Integration with Odoo

Open Source Odoo AI Integration Module

This AI integration module is open source and free, with the above features. It integrates with multiple AIs and is used within Odoo.

Please download from GitHub or the official Odoo App Store

https://www.github.com/guohuadeng/app-odoo 

Apply for a Baidu Account

Anyone who can keep reading this article is probably a programmer. Baidu API and Baidu Webmaster are definitely must-haves for everyone. Without further ado, proceed. baidu.com Just apply, and you can search on Bing for details. 

Baidu AI Application Panel

Directly visit to apply for API

Apply at the following link, https://cloud.baidu.com/survey/qianfan.html

Or search for "Qianfan Large Model" to enter

Tongyi Qianwen Integration with Odoo

Click to activate immediately, provided you have completed personal or enterprise verification beforehand.

The system will select ERNIE-Bot, ERNIE-Bot-turbo, and Embedding-V1 large models by default. Among them:

ERNIE-Bot is a large language model independently developed by Baidu, covering massive Chinese data, with stronger capabilities in dialogue Q&A, content creation and generation, etc.

ERNIE-Bot-turbo is a large language model independently developed by Baidu, covering massive Chinese data, with stronger capabilities in dialogue Q&A, content creation and generation, etc., and faster response speed.

Embedding-V1 is a text representation model based on Baidu's ERNIE large model technology, which converts text into vector form represented by numerical values, used in scenarios such as text retrieval, information recommendation, and knowledge mining.

Tongyi Qianwen Integration with Odoo

 


Then the activation is successful...


Refer to Baidu's official documentation

Baidu has opened its data training set, and enterprises can train their own AI. For details, refer to the beginner's guide:

https://cloud.baidu.com/doc/WENXINWORKSHOP/s/qlgujhcpo 

Tongyi Qianwen Integration with Odoo

 

Development and integration companies and industries

The API documentation is quite complete and includes examples.

Development is simple. With experience and frameworks from ChatGPT and Google Bard, you just need to import the SDK and modify according to the example. Since front-end dialogue, intelligent customer service, website AI marketing, etc. are all already developed, you only need to add a Baidu Qianfan interface. After completion, configure it and it's ready to use.

Tongyi Qianwen Integration with Odoo


Code example

How to integrate with Baidu Qianfan? The official team already has simple examples in Python and Java. For high customizability, we use HTTPS POST, so by simulating a ChatGPT interface, we can use various rich ChatGPT clients.

Tongyi Qianwen Integration with Odoo

The relevant code is open-source and available for free download on the Odoo official app store: https://apps.odoo.com 

You can also get it from GitHub, the module name is app_ai_baidu: https://github.com/guohuadeng/app-odoo 


Directly integrate using the Request library


def get_baidu(self, data, author_id, answer_id, param={}):
self.ensure_one()
api_key = self.openapi_api_key
client_secret = self.client_secret
if not api_key or not client_secret:
raise UserError(_("Please provide Ai Robot [%s] API Key and Secret Key first." % self.name))
access_token = self.get_access_token()

if isinstance(data, list):
messages = data
else:
messages = [{"role": "user", "content": data}]

# url = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions?access_token=" + access_token
url = self.endpoint + access_token
payload = json.dumps({"messages": messages})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

 

API cost - free plus metered

Free 20 yuan worth of Tokens

Approximately 1.67 million free Tokens in total, which you can use heavily. If you want more, just apply for a few more accounts. Using our free Odoo module, it supports simultaneous use of multiple AI robots for industry services.


Billing Unit Price

Free for the first month, now it's getting expensive....


Tongyi Qianwen Integration with Odoo


Other Free AI Applications

If you want to use Microsoft Azure for free, please go here. We also have a guide for applying for a legal ChatGPT in China, but the approval process has become more difficult now.

ChatGPT-4 China Application, ChatGPT-3.5 China Free 1-Year Usage Guide, Microsoft Azure Cloud OpenAI Detailed API Registration Application Illustrated Tutorial, Integrated with Odoo AiCenter

Alibaba AI

Free activation tutorial for Alibaba AI Tongyi Qianwen API, Odoo serves the whole company and industry through AI interface

Quickly Build a Digital Asset Management Platform with Odoo - Compliant with New Ministry of Finance Regulations - Data Resources on the Balance Sheet