Cosmian AI
Cosmian AI aims to perform summarization and translation tasks, in a secured workflow.
Deploy Cosmian VM AI¶
Follow the instructions from the deployment guide.
Usage¶
Cosmian AI Runner exposes endpoints which can be fetched:
Summarize text¶
- Endpoint:
/summarize
- Method: POST
- Description: get the summary of a given text, using the configured model
-
Request:
Headers: ‘Content-Type: multipart/form-data’
Body:
doc
- text to summarize, using model configured on summary config section -
Response:
- Example:
curl --insecure 'https://${COSMIAN_VM_IP_ADDR}/summarize' \
--form 'doc="Il était une fois, dans un royaume couvert de vert émeraude et voilé dans les secrets murmurants des arbres anciens, vivait une princesse nommée Elara.."'
Translate text¶
- Endpoint:
/translate
- Method: POST
- Description: get the translation of a given text, using model configured on translation config section
-
Request:
Headers: ‘Content-Type: multipart/form-data’
Body:
doc
- text to translate |src_lang
- source language |tgt_lang
- targeted language -
Response:
- Example:
curl --insecure 'https://${COSMIAN_VM_IP_ADDR}/translate' \
--form 'doc="Il était une fois, dans un royaume couvert de vert émeraude et voilé dans les secrets murmurants des arbres anciens, vivait une princesse nommée Elara.."' --form 'src_lang=fr' --form 'tgt_lang=en'
Authentication¶
If your AI Runner is configured to handle authentication, in order to make requests to Cosmian VM AI, users must be authentificated using your Identity Provider application (setup previously for Client-Side encryption). It should be a Single Page or Web application type.