INNER CODE UNIT · TypeScript

getLocalApiRuntimeRunning

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

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) {
    throw new Error(result.message || '更新配置失败');
  }

  return result.data;
}

export async function resetLocalApiKey(): Promise<ResetLocalApiKeyResponse> {
  const result = await post<ResetLocalApiKeyResponse>(API_ENDPOINTS.RESET_API_KEY, {});
  if (!isSuccess(result) || !result.data) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…