Inchoker 96abd533c4
feat: cohere remote API extension (#2785)
* fix core

* add cohere extension

* add cohere response customizable

* nitpicking

* use transformResponse

* Update extensions/inference-cohere-extension/src/index.ts

Co-authored-by: Louis <louis@jan.ai>

* use prettier

* Update extensions/inference-cohere-extension/src/index.ts

Co-authored-by: Louis <louis@jan.ai>

* pass requestBody as object

* transformPayload as a property

* This is not correct. CHATBOT is an equivalent role to assistant.
system message should be used with the preamble parameter and should not be included in the chat_history

---------

Co-authored-by: Jack Tri Le <Jack>
Co-authored-by: Louis <louis@jan.ai>
2024-04-24 18:16:57 +07:00

44 lines
1.1 KiB
JSON

{
"name": "@janhq/inference-cohere-extension",
"productName": "Cohere Inference Engine",
"version": "1.0.0",
"description": "This extension enables Cohere chat completion API calls",
"main": "dist/index.js",
"module": "dist/module.js",
"engine": "cohere",
"author": "Jan <service@jan.ai>",
"license": "AGPL-3.0",
"scripts": {
"build": "tsc -b . && webpack --config webpack.config.js",
"build:publish": "rimraf *.tgz --glob && yarn build && npm pack && cpx *.tgz ../../pre-install",
"sync:core": "cd ../.. && yarn build:core && cd extensions && rm yarn.lock && cd inference-cohere-extension && yarn && yarn build:publish"
},
"exports": {
".": "./dist/index.js",
"./main": "./dist/module.js"
},
"devDependencies": {
"cpx": "^1.5.0",
"rimraf": "^3.0.2",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"ts-loader": "^9.5.0"
},
"dependencies": {
"@janhq/core": "file:../../core",
"fetch-retry": "^5.0.6",
"ulidx": "^2.3.0"
},
"engines": {
"node": ">=18.0.0"
},
"files": [
"dist/*",
"package.json",
"README.md"
],
"bundleDependencies": [
"fetch-retry"
]
}