INNER CODE UNIT · TypeScript

getLocalApiConfig

Simprint/simprint · plugins/pages/api-ai/src/api/index.ts:17

export async function getLocalApiConfig(): Promise<LocalApiConfig> {
  const result = await post<LocalApiConfig>(API_ENDPOINTS.GET_CONFIG, {});
  if (!isSuccess(result) || !result.data) {
    throw new Error(result.message || '获取配置失败');
  }

  return result.data;
}

export async function getLocalApiRuntimeRunning(): Promise<boolean> {
  return invoke<boolean>('get_local_api_runtime_running');
}

export async function updateLocalApiConfig(
  payload: UpdateLocalApiConfigRequest
): Promise<LocalApiConfig> {
  const result = await post<LocalApiConfig>(API_ENDPOINTS.UPDATE_CONFIG, payload);
  if (!isSuccess(result) || !result.data) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…