Developer

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This endpoint is available for all language resources of the OpenAI plug-in (OpenAI, Azure OpenAI and translate5 AI). The plug-in must be active.

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="99e87f09-1e2a-4cb4-9325-d158c0b7cb6f"><ac:plain-text-body><![CDATA[

URL:

/editor/plugins_openai_modelprops/[ID]]]></ac:plain-text-body></ac:structured-macro>

Available Methods:

GET / PUT<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="14f2a7f8-73c8-4fcc-8075-b44c61c52f0e"><ac:plain-text-body><![CDATA[

Specialities:

[ID] is the id of the language resource (see [LanguageResources: Instancehttps://confluence.translate5.net/display/TAD/LanguageResources%3A+Instance]). The language resource itself is created with the languageresourceinstance endpoint, this endpoint only reads and changes its model properties. Available for users with the role "pm" or "clientpm".

]]></ac:plain-text-body></ac:structured-macro>

Info

Send the header Accept: application/json to receive JSON. Without it, the response is returned as XML. Authentication works with an API token as described in _Basic Usage Examples.

...

Do not change model properties via the languageresourceinstance endpoint

...

The model properties are stored in the field "specificData" of the language resource. Sending model properties directly in a PUT request to /editor/languageresourceinstance/\[ID\] has no effect. Sending "specificData" there replaces its whole content, so all model properties set before are lost. Always use this endpoint to change model properties.

GET request example

Code Block
languagebash
curl -X GET 'https://YOUR_TRANSLATE5_HOST/editor/plugins_openai_modelprops/123' \
  --header 'Accept: application/json' \
  --header 'Translate5AuthToken: YOUR_APP_TOKEN'

...