mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
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:
parent
d9400e1e7b
commit
142cb8d655
35
90.md
35
90.md
|
@ -67,6 +67,37 @@ All tags are optional.
|
|||
* `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
|
||||
|
||||
## 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`)
|
||||
|
||||
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.
|
||||
* `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
|
||||
|
||||
| status | description |
|
||||
|
@ -168,4 +201,4 @@ Service Providers MAY use NIP-89 announcements to advertise their support for jo
|
|||
}
|
||||
```
|
||||
|
||||
Customers can use NIP-89 to see what service providers their follows use.
|
||||
Customers can use NIP-89 to see what service providers their follows use.
|
||||
|
|
Loading…
Reference in New Issue
Block a user