Go API 参考
计算消息中的令牌数
client.Messages.CountTokens(ctx, params) (*MessageTokensCount, error)POST/v1/messages/count_tokens
计算消息中的令牌数量。
获取用户配置文件
client.UserProfiles.Get(ctx, userProfileID, query) (*UserProfile, error)GET/v1/user_profiles/{user_profile_id}
更新用户配置文件
client.UserProfiles.Update(ctx, userProfileID, params) (*UserProfile, error)POST/v1/user_profiles/{user_profile_id}
删除用户配置文件
client.UserProfiles.Delete(ctx, userProfileID, body) (*DeletedUserProfile, error)DELETE/v1/user_profiles/{user_profile_id}
获取当前组织
client.Organization.Get(ctx) (*OrganizationInfo, error)GET/v1/organizations/me
检索与经过身份验证的 API 密钥关联的组织的信息。