** IMPORTANT LEGAL DISCLAIMER **
“tencent” python package is not affiliated, endorsed, or vetted by Tencent Corporation. It’s an open-source pakcage and crowd contributed API Wrapper of public available tencent products and services to help developers deploy and use these product or services easier. This package name is originally intended to serve as “ten cent(s)” or “one dime”, quoted from one ex-Tencent-er.
Contributing API Wrapper to tencent pypi package, Visit Github tencent package Github repo and follow the guidelines on forum Tencent Pypi Developing Forum deepnlp.org.
API NAME | FUNCTIONS | Status |
---|---|---|
greeting | Greeting when import package | Prod |
stock_price | Fetch Tencent Stock Price (HKEX: 700) Realtime Quote | Prod |
WechatServerVeriAPI | Wechat Server Verification 微信公众号订阅号服务器验证 | Prod |
WechatTextReplyBaseAPI | Wechat Message Text Reply 处理微信用户文本输入API的基类 | Prod |
WechatImageReplyBaseAPI | Wechat Message Image Reply 处理微信用户图像输入基类API 基类 | Prod |
pip install tencent
import tencent
tencent.greeting()
import tencent
stock_dict = tencent.api("stock_price")
keys=["symbol", "avg_price", "high", "low", "change", "update_time", "market_capitalization", "source"]
print ("#### Tencent Stock Price #### ")
for key in keys:
if key in stock_dict:
print (key + "|" + stock_dict[key])
else:
print (key + "|" + "")
Output
symbol|700
avg_price|420.400 HKD
high|424.600 HKD
low|412.600 HKD
change|+3.400
update_time|16 Oct 2024 09:36
market_capitalization|3,901.15 B HKD
source|HKEX, https://www.hkex.com.hk/Market-Data/Securities-Prices/Equities/Equities-Quote?sym=700&sc_lang=en
微信公众号后台,python服务自动回复(文本/图像/语音),一键验证和服务部署,依赖Flask的python框架
see /examples/wechat/main.py
# start flask server backend
python ./examples/wechat/main.py
执行效果
see /tests/test_agent_api_tools.py for more details
import json
import tencent
from tencent.utils.agent_utils import function_to_schema
def tencent_api_base(arg1, arg2, arg3, arg4="value4", arg5 = "value5"):
result = tencent.api("api_base", arg1, arg2, arg3, arg4=arg4, arg5 = arg5)
print ("DEBUG: tencent_api_base result %s" % str(result))
return result
def prepare_agent_api_schema():
tools = [tencent_api_base]
tool_schemas = [function_to_schema(tool) for tool in tools]
print ("DEBUG: Agent API Schema")
[print(json.dumps(schema, indent=2)) for schema in tool_schemas]
return tool_schemas
prepare_agent_api_schema()
def call_openai_api_tools():
"""
swarm, need openai keys
"""
tool_schemas = prepare_agent_api_schema()
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Calling Tencent Service and Return Results"}],
tools=tool_schemas,
)
message = response.choices[0].message
message.tool_calls[0].function
call_openai_api_tools()
Tencent Python Package Contributing General Guidelines
Introduction to multimodal generative models
Generative AI Search Engine Optimization
AI Image Generator User Reviews
AI Video Generator User Reviews
AI Chatbot & Assistant Reviews
Best AI Tools User Reviews
AI Agent Marketplace and Search
Robot Search
Equation and Academic search
AI & Robot Comprehensive Search
AI & Robot Question
AI & Robot Community
AI Agent Marketplace Blog
AI Agent Reviews
AI Agent Publisher
Microsoft AI Agents Reviews
Claude AI Agents Reviews
OpenAI AI Agents Reviews
AgentGPT AI Agents Reviews
Saleforce AI Agents Reviews
AI Agent Builder Reviews
OpenAI o1 Reviews
OpenAI o3 Reviews
AI & Robotics User Reviews
AI & Robotics Best AI Tools List
OpenAI o1 Reviews
ChatGPT User Reviews
Gemini User Reviews
Perplexity User Reviews
Claude User Reviews
Qwen AI Reviews
Doubao Reviews
ChatGPT Strawberry
Zhipu AI Reviews
Midjourney User Reviews
Stable Diffusion User Reviews
Runway User Reviews
GPT-5 Forecast
Flux AI Reviews
Canva User Reviews
Luma AI
Pika AI Reviews
Runway AI Reviews
Kling AI Reviews
Dreamina AI Reviews
Coursera Reviews
Udacity Reviews
Grammarly Reviews
Tesla Cybercab Robotaxi
Tesla Optimus
Figure AI
Unitree Robotics Reviews
Waymo User Reviews
ANYbotics Reviews
Boston Dynamics
DeepNLP AI Tools
Multi-Turn Dialogue Visualization
Multi Asynchronous Agent Visualization
Apple Glasses
Meta Glasses
Apple AR VR Headset
Google Glass
Meta VR Headset
Google AR VR Headsets
BYD Seal
Tesla Model 3
BMW i4
Baidu Apollo Reviews
Hyundai IONIQ 6