นำเข้า flow ของ Langflow — โปรเจกต์เริ่มต้น Basic Prompting
โปรเจกต์aggrega import เป็น Aggregate, Release และ Manifest ที่
นำ
| โฟลเดอร์ | สิ่ง |
|---|---|
source/ | flow ที่basic-prompting.json ไฟล์ .aggrega-config.yaml ที่import-answers.yaml ซึ่ง |
draft/ | ไฟล์aggrega import basic-prompting.json --target compose เขียน โดยstdout.txt สำหรับimport.txt สำหรับ |
source/basic-prompting.json คือ504c02fc47e76087b82b0e7cbe4186e9cdd916d4 ไฟล์ src/lfx/tests/data/starter_projects_1_6_0/Basic Prompting.json) ภายLICENSE.langflow ร่าง
ใน checkout ของcheck.sh รันdraft/ เปรียบAGGREGA_CATALOG_DIRS
ร่างตัวอย่าง
คุณ
เขียน
aggrega draft --example import-langflowจาก
cd import-langflowบิลด์
การนำsource/ และ pull สิ่งAGGREGA_CATALOG_DIRS หรือworkspace.catalog_dirs — จะ
cd sourceaggrega import basic-prompting.json --target composeaggrega validate --release release.yamlaggrega build --release release.yamlการ
กับผู้ช่วย AI
ผู้
ใช้เครื่องมือของ Aggrega เท่านั้น และอย่าสร้างโฟลเดอร์เอง หากโฟลเดอร์พื้นที่ทำงานยังไม่มีโฟลเดอร์ `import-langflow` ให้เรียกเครื่องมือ `draft` หนึ่งครั้งโดยตั้ง `example` เป็น `import-langflow` และไม่ระบุ `dir` เครื่องมือจะเขียนตัวอย่างลงในโฟลเดอร์ `import-langflow` ใหม่ ซึ่งโฟลเดอร์ `source` ของโฟลเดอร์นั้นเก็บสิ่งที่ตัวอย่างนี้นำเข้า จากนั้นเรียกเครื่องมือ `import` โดยตั้ง `workspace_root` เป็น `import-langflow/source` ตั้ง `source` เป็น `basic-prompting.json` และตั้ง `target` เป็น `compose` เครื่องมือจะอ่านคำตอบที่ต้องใช้จาก `import-answers.yaml` ที่อยู่ข้าง `basic-prompting.json` เขียนร่างลงใน `import-langflow/source` และ pull สิ่งที่ร่างเหล่านั้นต้องใช้ จากนั้นเรียกเครื่องมือ `validate` โดยตั้ง `workspace_root` เป็น `import-langflow/source` และตั้ง `release` เป็น `release.yaml` และเรียกเครื่องมือ `build` โดยตั้ง `workspace_root` เป็น `import-langflow/source` ตั้ง `release` เป็น `release.yaml` และตั้ง `write` เป็น true แล้วบอกฉันว่าบิลด์เขียนไฟล์ใดบ้าง ไฟล์เหล่านั้นอยู่ใน `import-langflow/source/dist/`ทดสอบ
เมื่อadmin จะพบ Basic Prompting ใน
curl -sS -X POST 'http://127.0.0.1:7860/api/v1/run/0dbee653-41ae-4e51-af2e-55757fb24be3?stream=false' \ -H 'x-api-key: <api_key>' -H 'Content-Type: application/json' \ -d '{"input_value": "In one short sentence: what is Docker Compose?", "input_type": "chat", "output_type": "chat"}'{"detail":"{\"message\":\"Error running graph: Error building Component Language Model: \\n\\nError code: 401 - {'error': {'message': 'Incorrect API key provided: sk-place*****************-key. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'code': 'invalid_api_key', 'param': None}, 'status': 401}\",[… omitted: three empty fields, and a suggestion to update three of the flow's components]}"}คีย์ OpenAI ที่
เมื่อ--target helm และ
kubectl port-forward -n <namespace> svc/langflow-default 7860:7860