Spaces:
Running
Running
Download api/v2/_services/smartQuestionEngine.ts from Sarvesh213/getcert-backend: direct link, hf CLI and curl.
- Browser
- Download file 575 Bytes
-
https://huggingface.co/spaces/Sarvesh213/getcert-backend/resolve/main/api/v2/_services/smartQuestionEngine.ts
- Command line
-
hf download hf://spaces/Sarvesh213/getcert-backend/api/v2/_services/smartQuestionEngine.ts
-
curl -L -o smartQuestionEngine.ts https://huggingface.co/spaces/Sarvesh213/getcert-backend/resolve/main/api/v2/_services/smartQuestionEngine.ts
575 Bytes
| import type { GitHubRepoMetadata, SmartQuestion } from '../_types.js'; | |
| import { generateProjectQuestions } from './llm_service.js'; | |
| export async function buildSmartQuestions( | |
| skill: string, | |
| metadata: GitHubRepoMetadata, | |
| retryCount: number, | |
| isDesignProject = false | |
| ): Promise<SmartQuestion[]> { | |
| const modelQuestions = await generateProjectQuestions(skill, metadata, retryCount, isDesignProject); | |
| return modelQuestions.map((item, index) => ({ | |
| id: item.id || `sq-${index + 1}`, | |
| prompt: item.prompt, | |
| expectedSignals: item.expectedSignals || [], | |
| })); | |
| } | |