Add staging engine (+ logs) (#225)
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
"clean": "rm -rf out && rm -rf scaffold/node_modules",
|
"clean": "rm -rf out && rm -rf scaffold/node_modules",
|
||||||
"start": "electron-forge start",
|
"start": "electron-forge start",
|
||||||
"dev:engine": "DYAD_LOCAL_ENGINE=http://localhost:8080/v1 npm start",
|
"dev:engine": "DYAD_LOCAL_ENGINE=http://localhost:8080/v1 npm start",
|
||||||
|
"staging:engine": "DYAD_LOCAL_ENGINE=https://staging---dyad-llm-engine-kq7pivehnq-uc.a.run.app/v1 npm start",
|
||||||
"staging:gateway": "DYAD_GATEWAY_URL=https://staging---litellm-gcp-cloud-run-kq7pivehnq-uc.a.run.app/v1 npm start",
|
"staging:gateway": "DYAD_GATEWAY_URL=https://staging---litellm-gcp-cloud-run-kq7pivehnq-uc.a.run.app/v1 npm start",
|
||||||
"package": "npm run clean && electron-forge package",
|
"package": "npm run clean && electron-forge package",
|
||||||
"make": "npm run clean && electron-forge make",
|
"make": "npm run clean && electron-forge make",
|
||||||
|
|||||||
@@ -69,9 +69,8 @@ Creates a chat model for text generation.
|
|||||||
export function createDyadEngine(
|
export function createDyadEngine(
|
||||||
options: ExampleProviderSettings,
|
options: ExampleProviderSettings,
|
||||||
): DyadEngineProvider {
|
): DyadEngineProvider {
|
||||||
const baseURL = withoutTrailingSlash(
|
const baseURL = withoutTrailingSlash(options.baseURL);
|
||||||
options.baseURL ?? "https://api.example.com/v1",
|
logger.info("creating dyad engine with baseURL", baseURL);
|
||||||
);
|
|
||||||
const getHeaders = () => ({
|
const getHeaders = () => ({
|
||||||
Authorization: `Bearer ${loadApiKey({
|
Authorization: `Bearer ${loadApiKey({
|
||||||
apiKey: options.apiKey,
|
apiKey: options.apiKey,
|
||||||
|
|||||||
Reference in New Issue
Block a user