Skip to content

Commit 71ea2b6

Browse files
committed
further sdk module/docs/example updates
Signed-off-by: Vaughn Dice <vdice@akamai.com>
1 parent 96588ca commit 71ea2b6

21 files changed

Lines changed: 35 additions & 34 deletions

File tree

docs/v4/http/index.html

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v4/key_value.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v4/mqtt.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v4/postgres.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v4/redis.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v4/sqlite.html

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v4/variables.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/spin-kv/app.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44
class WasiHttpHandler030Rc20260315(http.Handler):
55
async def handle_request(self, request: Request) -> Response:
6-
with key_value.open_default() as a:
7-
a.set("test", bytes("hello world!", "utf-8"))
8-
print(a.get_keys())
9-
print(a.exists("test"))
10-
print(a.get("test"))
11-
a.delete("test")
12-
print(a.get_keys())
6+
with await key_value.open_default() as a:
7+
await a.set("test", bytes("hello world!", "utf-8"))
8+
print(await a.get_keys())
9+
print(await a.exists("test"))
10+
print(await a.get("test"))
11+
await a.delete("test")
12+
print(await a.get_keys())
1313

1414
return Response(
1515
200,

examples/spin-llm/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
class WasiHttpHandler030Rc20260315(http.Handler):
55
async def handle_request(self, request: Request) -> Response:
6-
res = llm.infer("llama2-chat", "tell me a joke")
6+
res = llm.infer("all-minilm-l6-v2", "tell me a joke")
77
print(res.text)
88
print(res.usage)
9-
res = llm.infer_with_options("llama2-chat", "what is the theory of relativity", llm.InferencingParams(temperature=0.5))
9+
res = llm.infer_with_options("all-minilm-l6-v2", "what is the theory of relativity", llm.InferencingParams(temperature=0.5))
1010
print(res.text)
1111
print(res.usage)
1212
return Response(

examples/spin-llm/spin.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ component = "test"
1313
[component.test]
1414
source = "app.wasm"
1515
allowed_outbound_hosts = []
16-
ai_models = ["llama2-chat"]
16+
ai_models = ["all-minilm-l6-v2"]
1717
[component.test.build]
1818
command = "componentize-py -w spin:up/http-trigger@4.0.0 componentize app -o app.wasm"

0 commit comments

Comments
 (0)