Update 90.md

Added optional Encryption to params and payload if the user require the input and output to be a secret.
This commit is contained in:
starbuilder 2023-10-15 10:44:07 -04:00 committed by GitHub
parent d9400e1e7b
commit 142cb8d655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

33
90.md
View File

@ -67,6 +67,37 @@ All tags are optional.
* `relays`: List of relays where Service Providers SHOULD publish responses to * `relays`: List of relays where Service Providers SHOULD publish responses to
* `p`: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job * `p`: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job
## Encrypted Params
If 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.
```json
[
[ "i", "what is the capital of France? ", "prompt" ],
[ "param", "model", "LLaMA-2" ],
[ "param", "max_tokens", "512" ],
[ "param", "temperature", "0.5" ],
[ "param", "top-k", "50" ],
[ "param", "top-p", "0.7" ],
[ "param", "frequency_penalty", "1" ],
[ "param", "output", "encrypted"]
]
```
This param data will be encrypted and added to the `content` field and `p` tag should be present
```
"content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...",
"tags": [
[`p`, `04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f`]
]
```
## Job result (`kind:6000-6999`) ## Job result (`kind:6000-6999`)
Service 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. Service 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.
* `amount` tag: as defined in the [Job Result](#job-result) section. * `amount` tag: as defined in the [Job Result](#job-result) section.
* `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. * `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.
* NOTE: If the input params requires input to be encryped, then `content` field will have encrypted payload with `p` tag as key.
### Job feedback status ### Job feedback status
| status | description | | status | description |