dsh-ai4scholar
AI4Scholar 学术工具包:提供 38 个原生学术工具(涵盖 Semantic Scholar、PubMed、arXiv、PDF 全文提取、自动引用等)。
AI 分析
核心用途是提供全面的学术文献检索与处理工具。适合需要高效检索文献、下载并解析 PDF、管理引用的科研工作者。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:literaf/dsh-ai4scholar說明文件
閱讀完整 README ↗Configuration
The bundle mounts one row (id: ai4scholar) with these defaults. Override from your profile's cordis.patch.yml (a patch replaces the whole config, so restate every key you keep):
- id: ai4scholar
config:
apiKeyEnv: AI4SCHOLAR_API_KEY # credential reference; the key itself never lives in config
baseUrl: https://ai4scholar.net
# tool families
semanticScholar: true
pubmed: true
googleScholar: true
arxiv: true
biorxiv: true # bioRxiv + medRxiv
doi: true
fullText: true # the read_* tools (PDF download + text extraction)
autoCite: true
sciDraw: true
creditsTool: true # get_ai4scholar_credits
command: true # the /ai4scholar slash command
balanceRoute: true # GET /ai4scholar/balance for the settings card's key test
showCredits: true # credit line on billed results
promptGuidance: true # short system-prompt section describing the tools
promptOrder: 150
# sizes
defaultMaxResults: 10 # when the model omits max_results
maxResultsCap: 50 # hard upper bound per call
abstractMaxChars: 600 # abstract characters shown per paper; 0 hides abstracts
readMaxChars: 60000 # characters per full-text slice
# timeouts / retry
requestTimeoutMs: 30000 # per HTTP attempt
pdfTimeoutMs: 120000 # per PDF download
generationTimeoutMs: 300000 # auto_cite / sci_draw
maxRetries: 3 # attempts on 429 / network errors
retryBackoffMs: 2000 # doubles per attempt
toolTimeoutMs: 180000 # cooperative per-call budget enforced by dsh
The API key is resolved per call through ctx.credentials, so storing or rotating it takes effect on the next tool call without a restart. When the credentials service is absent (a custom composition), the plugin falls back to process.env[apiKeyEnv].
The settings card always edits AI4SCHOLAR_API_KEY (the browser half does not receive the row config); a deployment that overrides apiKeyEnv manages that reference through the environment or the credentials file instead. The session credit tally is process-local (it restarts with dsh); the balance itself always comes from the API.