@@ -20,6 +20,84 @@ actions:
2020
2121 # Handle response
2222 print(res)
23+ - target : $["paths"]["/v1/completions"]["post"]
24+ update :
25+ x-codeSamples :
26+ - lang : python
27+ label : completions_create
28+ source : |-
29+ from atoma_sdk import AtomaSDK
30+ import os
31+
32+ with AtomaSDK(
33+ bearer_auth=os.getenv("ATOMASDK_BEARER_AUTH", ""),
34+ ) as atoma_sdk:
35+
36+ completion = atoma_sdk.completions.create(
37+ model="meta-llama/Llama-3.3-70B-Instruct",
38+ prompt="Hello, how are you?"
39+ )
40+
41+ print(completion.choices[0].text)
42+ - target : $["paths"]["/v1/completions#stream"]["post"]
43+ update :
44+ x-codeSamples :
45+ - lang : python
46+ label : completions_create_stream
47+ source : |-
48+ from atoma_sdk import AtomaSDK
49+ import os
50+
51+ with AtomaSDK(
52+ bearer_auth=os.getenv("ATOMASDK_BEARER_AUTH", ""),
53+ ) as atoma_sdk:
54+
55+ completion = atoma_sdk.completions.create_stream(
56+ model="meta-llama/Llama-3.3-70B-Instruct",
57+ prompt="Hello, how are you?"
58+ )
59+
60+ for chunk in completion:
61+ print(chunk.data.choices[0].text)
62+ - target : $["paths"]["/v1/confidential/completions"]["post"]
63+ update :
64+ x-codeSamples :
65+ - lang : python
66+ label : chat_completions_create
67+ source : |-
68+ from atoma_sdk import AtomaSDK
69+ import os
70+
71+ with AtomaSDK(
72+ bearer_auth=os.getenv("ATOMASDK_BEARER_AUTH", ""),
73+ ) as atoma_sdk:
74+
75+ completion = atoma_sdk.confidential_completions.create(
76+ model="meta-llama/Llama-3.3-70B-Instruct",
77+ prompt="Hello, how are you?"
78+ )
79+
80+ print(completion.choices[0].text)
81+ - target : $["paths"]["/v1/confidential/completions#stream"]["post"]
82+ update :
83+ x-codeSamples :
84+ - lang : python
85+ label : confidential_completions_create_stream
86+ source : |-
87+ from atoma_sdk import AtomaSDK
88+ import os
89+
90+ with AtomaSDK(
91+ bearer_auth=os.getenv("ATOMASDK_BEARER_AUTH", ""),
92+ ) as atoma_sdk:
93+
94+ completion = atoma_sdk.confidential_completions.create_stream(
95+ model="meta-llama/Llama-3.3-70B-Instruct",
96+ prompt="Hello, how are you?"
97+ )
98+
99+ for chunk in completion:
100+ print(chunk.data.choices[0].text)
23101 - target : $["paths"]["/v1/chat/completions"]["post"]
24102 update :
25103 x-codeSamples :
0 commit comments