Go API 參考文件
計算訊息中的 Token 數
client.Messages.CountTokens(ctx, params) (*MessageTokensCount, error)POST/v1/messages/count_tokens
計算訊息中的 Token 數量。
取得使用者設定檔
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 金鑰相關聯之組織的資訊。