You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于Chatbase按用户Locale分组及传递Locale信息的技术咨询

Chatbase Technical Questions for Multilingual Messenger Bot

Hey there! Let's walk through your Chatbase questions with practical, platform-specific insights:

1. Does Chatbase support grouping conversations by user Locale?

Absolutely! While Locale isn't a pre-built grouping filter in Chatbase's default analytics views, you can easily set this up by attaching Locale data as a custom user/message attribute. Once you've included Locale information in your API requests (more on that next), you can use Chatbase's custom filtering and grouping tools in the analytics dashboard to segment conversations by any Locale value you've tracked. This works great for analyzing bot performance across different language regions.

2. Can I pass Locale information in the message_received request?

You sure can! The Chatbase API allows adding custom metadata directly in the message_received payload via the chatbase_fields object. You can create a dedicated locale key here to attach the user's Locale to each message. Here's a quick example of what that request might look like:

{
  "message": "Bonjour!",
  "user_id": "user_456",
  "intent": "greeting",
  "chatbase_fields": {
    "locale": "fr-FR"
  },
  "type": "user",
  "platform": "messenger"
}

This ensures the Locale data is tied to the specific message and linked to the user's full conversation history in Chatbase.

3. Is it compliant to append Locale to the chatbase_fields.version field?

Nope, this isn't a recommended or compliant use of the version field. The chatbase_fields.version is explicitly designed to track your bot's software release versions (e.g., v1.2.0, alpha-5). Using it to store Locale data will corrupt your version-based analytics—you won't be able to accurately track how different bot versions perform, and it will muddle your data aggregation. Instead, use a custom locale key in the chatbase_fields object as shown in the previous question. That's exactly what custom metadata fields are intended for!

内容的提问来源于stack exchange,提问作者Oles Pankiv

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:58:04