upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/90.md
diff options
context:
space:
mode:
authorstarbuilder <101296187+starbackr-dev@users.noreply.github.com>2023-10-15 10:44:07 -0400
committerGitHub <noreply@github.com>2023-10-15 10:44:07 -0400
commit142cb8d655d411628517b44a1cbafdc8c1fbcc68 (patch)
tree6211473a744741dbfe6b45ca7c0dfc5a08adde28 /90.md
parentd9400e1e7b08225aedb6c78b522c5ad07b5198b4 (diff)
Update 90.md
Added optional Encryption to params and payload if the user require the input and output to be a secret.
Diffstat (limited to '90.md')
-rw-r--r--90.md35
1 files changed, 34 insertions, 1 deletions
diff --git a/90.md b/90.md
index 4c0eff6..7de34fc 100644
--- a/90.md
+++ b/90.md
@@ -67,6 +67,37 @@ All tags are optional.
67* `relays`: List of relays where Service Providers SHOULD publish responses to 67* `relays`: List of relays where Service Providers SHOULD publish responses to
68* `p`: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job 68* `p`: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job
69 69
70## Encrypted Params
71
72If the user wants to keep the input parameters a secret, they can encrypt the `i` and `param` tags with the service provider's 'p' tag and add it to the content field. The user also indicates whether the output should be encrypted or not as one of the parameters.
73
74```json
75[
76 [ "i", "what is the capital of France? ", "prompt" ],
77 [ "param", "model", "LLaMA-2" ],
78 [ "param", "max_tokens", "512" ],
79 [ "param", "temperature", "0.5" ],
80 [ "param", "top-k", "50" ],
81 [ "param", "top-p", "0.7" ],
82 [ "param", "frequency_penalty", "1" ],
83 [ "param", "output", "encrypted"]
84]
85
86```
87
88This param data will be encrypted and added to the `content` field and `p` tag should be present
89
90```
91"content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...",
92 "tags": [
93 [`p`, `04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f`]
94
95 ]
96
97
98```
99
100
70## Job result (`kind:6000-6999`) 101## Job result (`kind:6000-6999`)
71 102
72Service providers publish job results, providing the output of the job result. They should tag the original job request event id as well as the customer's pubkey. 103Service providers publish job results, providing the output of the job result. They should tag the original job request event id as well as the customer's pubkey.
@@ -110,6 +141,8 @@ Service providers can give feedback about a job back to the customer.
110* `amount` tag: as defined in the [Job Result](#job-result) section. 141* `amount` tag: as defined in the [Job Result](#job-result) section.
111* `status` tag: Service Providers SHOULD indicate what this feedback status refers to. [Appendix 1](#appendix-1-job-feedback-status) defines status. Extra human-readable information can be added as an extra argument. 142* `status` tag: Service Providers SHOULD indicate what this feedback status refers to. [Appendix 1](#appendix-1-job-feedback-status) defines status. Extra human-readable information can be added as an extra argument.
112 143
144* NOTE: If the input params requires input to be encryped, then `content` field will have encrypted payload with `p` tag as key.
145
113### Job feedback status 146### Job feedback status
114 147
115| status | description | 148| status | description |
@@ -168,4 +201,4 @@ Service Providers MAY use NIP-89 announcements to advertise their support for jo
168} 201}
169``` 202```
170 203
171Customers can use NIP-89 to see what service providers their follows use. \ No newline at end of file 204Customers can use NIP-89 to see what service providers their follows use.