LibreChat/packages/data-provider/src/headers-helpers.ts
Dan Orlando 04e4259005
Move data provider to shared package (#582)
* create data-provider package and move code from data-provider folder to be shared between apps

* fix type issues

* add packages to ignore

* add new data-provider package to apps

* refactor: change client imports to use @librechat/data-provider package

* include data-provider build script in frontend build

* fix type issue after rebasing

* delete admin/package.json from this branch

* update test ci script to include building of data-provider package

* Try using regular build for test action

* Switch frontend-review back to build:ci

* Remove loginRedirect from Login.tsx

* Add ChatGPT back to EModelEndpoint
2023-07-04 15:47:41 -04:00

9 lines
274 B
TypeScript

import axios from 'axios';
export function setAcceptLanguageHeader(value: string): void {
axios.defaults.headers.common['Accept-Language'] = value;
}
export function setTokenHeader(token: string) {
axios.defaults.headers.common['Authorization'] = 'Bearer ' + token;
}