File
Blob: samples/pyodide-langchain/config.capnp
| 1 | using Workerd = import "/workerd/workerd.capnp"; |
| 2 | |
| 3 | const config :Workerd.Config = ( |
| 4 | services = [ |
| 5 | (name = "main", worker = .mainWorker), |
| 6 | ], |
| 7 | |
| 8 | sockets = [ |
| 9 | # Serve HTTP on port 8080. |
| 10 | ( name = "http", |
| 11 | address = "*:8080", |
| 12 | http = (), |
| 13 | service = "main" |
| 14 | ), |
| 15 | ], |
| 16 | ); |
| 17 | |
| 18 | const mainWorker :Workerd.Worker = ( |
| 19 | modules = [ |
| 20 | (name = "worker.py", pythonModule = embed "./worker.py"), |
| 21 | (name = "langchain_core", pythonRequirement = ""), |
| 22 | (name = "langchain_openai", pythonRequirement = ""), |
| 23 | ], |
| 24 | compatibilityDate = "2023-12-18", |
| 25 | compatibilityFlags = ["python_workers"], |
| 26 | # Learn more about compatibility dates at: |
| 27 | # https://developers.cloudflare.com/workers/platform/compatibility-dates/ |
| 28 | ); |