Add translate message action (#6609)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-09-19 22:35:18 +07:00
committed by GitHub
parent c0448a373f
commit 8d9cebdd67
62 changed files with 926 additions and 130 deletions
+6 -1
View File
@@ -14,10 +14,12 @@
//
import { Account, Class, Doc, type Mixin, Ref, Space } from '@hcengineering/core'
import type { Plugin } from '@hcengineering/platform'
import type { Metadata, Plugin } from '@hcengineering/platform'
import { plugin } from '@hcengineering/platform'
import { ChatMessage } from '@hcengineering/chunter'
export * from './types'
export const aiBotId = 'ai-bot' as Plugin
export const aiBotAccountEmail = 'huly.ai.bot@hc.engineering'
@@ -51,6 +53,9 @@ export interface TransferredMessage extends ChatMessage {
}
const aiBot = plugin(aiBotId, {
metadata: {
EndpointURL: '' as Metadata<string>
},
class: {
AIBotEvent: '' as Ref<Class<AIBotEvent>>,
AIBotTransferEvent: '' as Ref<Class<AIBotTransferEvent>>,
+26
View File
@@ -0,0 +1,26 @@
//
// Copyright © 2024 Hardcore Engineering Inc.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
import { Markup } from '@hcengineering/core'
export interface TranslateRequest {
text: Markup
lang: string
}
export interface TranslateResponse {
text: Markup
lang: string
}