用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/expectedparrot/vernon --skill file-store命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Patterns for creating EDSL AgentLists from various sources: lists, CSV, Excel, DataFrame, and programmatic combinations.
Saving EDSL objects locally and publishing them to Coop (Expected Parrot's servers).
Templates for the standard EDSL study files: survey, scenarios, agents, models, and create_results.py.
正在显示 SKILL.md
基于 SOC 职业分类
| name | file-store |
| description | Using FileStore to wrap files (images, PDFs, data) for use in EDSL survey scenarios. |
Use FileStore(path=...) to wrap any file for use in surveys:
from edsl import FileStore
fs = FileStore(path="photo.png")
This works with many file types: images (png, jpeg, svg), documents (pdf, docx, pptx), data (csv, xlsx, json), text (txt, md, html), code (py, sql), databases (db/sqlite), video (mp4, webm), and LaTeX.
Pass a FileStore as a scenario value, then reference it in question text with Jinja2 templating:
from edsl import FileStore, Scenario, QuestionFreeText, Survey
fs = FileStore(path="chart.png")
scenario = Scenario({"file_path": fs})
q = QuestionFreeText(
question_name="describe",
question_text="What is in this image: {{ scenario.file_path }}?"
)
survey = Survey([q])
results = survey.by(scenario).run()
The {{ scenario.file_path }} placeholder is replaced with the file content at runtime, so the model sees the actual image/document.
Process many files by creating a scenario for each:
from edsl import FileStore, Scenario, ScenarioList
filenames = ["doc1.pdf", "doc2.pdf", "doc3.pdf"]
scenarios = ScenarioList([
Scenario({"file_path": FileStore(path=f)}) for f in filenames
])
results = survey.by(scenarios).run()
Scenarios can contain both files and regular data:
scenario = Scenario({
"file_path": FileStore(path="resume.pdf"),
"job_title": "Software Engineer"
})
q = QuestionFreeText(
question_name="evaluate",
question_text="Review this resume: {{ scenario.file_path }}. How well does the candidate fit the role of {{ job_title }}?"
)
| Task | Code |
|---|---|
| Create from file | FileStore(path="file.png") |
| Wrap in scenario | Scenario({"file_path": fs}) |
| Reference in question | {{ scenario.file_path }} |
| Multiple files | ScenarioList([Scenario({"file_path": FileStore(path=f)}) for f in files]) |
| Extract text | fs.extract_text() |
| CSV to scenarios | FileStore(path="data.csv").to_scenario_list() |
| Get MIME type | fs.mime_type |
| Check if image | fs.is_image() |