-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspin.toml
38 lines (31 loc) · 1.12 KB
/
spin.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
spin_manifest_version = 2
[application]
name = "openai-proxy"
version = "0.1.0"
authors = ["Peter Salomonsen <pjsalomonsen@gmail.com>"]
description = ""
[[trigger.http]]
route = "/..."
component = "openai-proxy"
[component.openai-proxy]
source = "openai-proxy/target/wasm32-wasi/release/openai_proxy.wasm"
allowed_outbound_hosts = ["https://api.openai.com:443", "https://aitoken.testnet.page:443"]
key_value_stores = ["default"]
[component.openai-proxy.build]
command = "cargo build --target wasm32-wasi --release"
workdir = "openai-proxy"
watch = ["src/**/*.rs", "Cargo.toml"]
[variables]
openai_api_key = { required = true }
refund_signing_key = { required = true }
openai_completions_endpoint = { required = true }
ft_contract_id = { required = true }
[component.openai-proxy.variables]
openai_api_key = "{{ openai_api_key }}"
refund_signing_key = "{{ refund_signing_key }}"
openai_completions_endpoint = "{{ openai_completions_endpoint }}"
ft_contract_id = "{{ ft_contract_id }}"
[component.openai-proxy.tool.spin-test]
source = "tests/target/wasm32-wasip1/release/tests.wasm"
build = "cargo component build --release"
workdir = "tests"