mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-09 22:09:06 -05:00
more cleanup
This commit is contained in:
parent
a9dd557453
commit
def620e1ce
|
@ -27,19 +27,10 @@ A request to have data processed -- published by a customer
|
||||||
"kind": 68001,
|
"kind": 68001,
|
||||||
"content": "",
|
"content": "",
|
||||||
"tags": [
|
"tags": [
|
||||||
// The type of data processing the user wants to be performed
|
|
||||||
[ "j", "<job-type>", "<optional-model>" ],
|
[ "j", "<job-type>", "<optional-model>" ],
|
||||||
|
|
||||||
// input(s) for the job request
|
|
||||||
[ "i", "<data>", "<input-type>", "<marker>" ],
|
[ "i", "<data>", "<input-type>", "<marker>" ],
|
||||||
|
[ "output", "<mime-type>" ],
|
||||||
// expected output format
|
|
||||||
[ "output", "mimetype" ],
|
|
||||||
|
|
||||||
// relays where the job result should be published
|
|
||||||
[ "relays", "wss://..."],
|
[ "relays", "wss://..."],
|
||||||
|
|
||||||
// millisats amount that the user is offering to pay
|
|
||||||
[ "bid", "<msat-amount>", "<optional-max-price>" ],
|
[ "bid", "<msat-amount>", "<optional-max-price>" ],
|
||||||
[ "exp", "<timestamp>" ],
|
[ "exp", "<timestamp>" ],
|
||||||
[ "p", "service-provider-1" ],
|
[ "p", "service-provider-1" ],
|
||||||
|
@ -94,7 +85,6 @@ The result of the job SHOULD be included in the `content` field. If the output i
|
||||||
* `status` tag: Service Providers MAY indicate errors or extra info about the results by including them in the `status` tag.
|
* `status` tag: Service Providers MAY indicate errors or extra info about the results by including them in the `status` tag.
|
||||||
* `amount`: millisats that the Service Provider is requesting to be paid.
|
* `amount`: millisats that the Service Provider is requesting to be paid.
|
||||||
|
|
||||||
##
|
|
||||||
# Protocol Flow
|
# Protocol Flow
|
||||||
* Customer publishes a job request
|
* Customer publishes a job request
|
||||||
`{ "kind": 68001, "tags": [ [ "j", "speech-to-text" ], ... ] }`
|
`{ "kind": 68001, "tags": [ [ "j", "speech-to-text" ], ... ] }`
|
||||||
|
@ -127,7 +117,7 @@ Service Providers might opt to give feedback about a job.
|
||||||
### E.g. Payment required
|
### E.g. Payment required
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"kind": 7,
|
"kind": 68003,
|
||||||
"content": "Please pay 7 sats for job xxxx",
|
"content": "Please pay 7 sats for job xxxx",
|
||||||
"tags": [
|
"tags": [
|
||||||
[ "e", <job-request-id> ],
|
[ "e", <job-request-id> ],
|
||||||
|
@ -148,11 +138,6 @@ Service providers are at obvious risk of having their results not compensated. M
|
||||||
|
|
||||||
It's out of scope (and undesirable) to have this NIP address this issue; the market should.
|
It's out of scope (and undesirable) to have this NIP address this issue; the market should.
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
### Multitple job acceptance
|
|
||||||
* Nothing prevents a user from accepting multiple job results.
|
|
||||||
|
|
||||||
# Appendix 1: Examples
|
# Appendix 1: Examples
|
||||||
|
|
||||||
## Transcript of a podcast from second `900` to `930`.
|
## Transcript of a podcast from second `900` to `930`.
|
||||||
|
@ -162,7 +147,7 @@ It's out of scope (and undesirable) to have this NIP address this issue; the mar
|
||||||
{
|
{
|
||||||
"id": "12345",
|
"id": "12345",
|
||||||
"pubkey": "abcdef",
|
"pubkey": "abcdef",
|
||||||
"content": "I need a transcript of Bitcoin.review",
|
"content": "",
|
||||||
"tags": [
|
"tags": [
|
||||||
[ "j", "speech-to-text" ],
|
[ "j", "speech-to-text" ],
|
||||||
[ "i", "https://bitcoin.review/episode1.mp3", "url" ],
|
[ "i", "https://bitcoin.review/episode1.mp3", "url" ],
|
||||||
|
@ -173,13 +158,30 @@ It's out of scope (and undesirable) to have this NIP address this issue; the mar
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### `kind:68002`: Job fulfillment
|
### `kind:68003`: Job Feedback: request for (partial) payment
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"kind": 68003,
|
||||||
|
"content": "",
|
||||||
|
"tags": [
|
||||||
|
["e", "12345"],
|
||||||
|
["p", "abcdef"],
|
||||||
|
["status", "payment-required"],
|
||||||
|
["amount", "1000"]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
* User zaps 1000 sats to event kind:68003.
|
||||||
|
|
||||||
|
### `kind:68002`: Job fulfillment + request for remaining payment
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"content": "blah blah blah",
|
"content": "blah blah blah",
|
||||||
"tags": [
|
"tags": [
|
||||||
["e", "12345"],
|
["e", "12345"],
|
||||||
["p", "abcdef"],
|
["p", "abcdef"],
|
||||||
|
["amount", "6000"]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -208,7 +210,7 @@ User publishes two job requests at the same time in the order they should be exe
|
||||||
{
|
{
|
||||||
"id": "12346",
|
"id": "12346",
|
||||||
"pubkey": "abcdef",
|
"pubkey": "abcdef",
|
||||||
"content": "I need a summarization",
|
"content": "",
|
||||||
"tags": [
|
"tags": [
|
||||||
[ "j", "summarization" ],
|
[ "j", "summarization" ],
|
||||||
[ "params", "length", "3 paragraphs" ],
|
[ "params", "length", "3 paragraphs" ],
|
||||||
|
@ -227,13 +229,26 @@ User publishes two job requests at the same time in the order they should be exe
|
||||||
"content": "",
|
"content": "",
|
||||||
"tags": [
|
"tags": [
|
||||||
[ "j", "translation" ],
|
[ "j", "translation" ],
|
||||||
[ "i", "<hexid>", "event" ]
|
[ "i", "<hexid>", "event", "wss://relay.nostr.com" ]
|
||||||
[ "params", "language", "es_AR" ],
|
[ "params", "language", "es_AR" ],
|
||||||
[ "bid", "100", "500" ]
|
[ "bid", "100", "500" ]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `kind:68003`: Job respomse
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"kind": 68003,
|
||||||
|
"content": "Che, que copado, boludo!",
|
||||||
|
"tags": [
|
||||||
|
["e", "12346"],
|
||||||
|
["p", "abcdef"],
|
||||||
|
["amount", "1000"]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## AI-image of the summarization of 2 podcasts
|
## AI-image of the summarization of 2 podcasts
|
||||||
|
|
||||||
### `kind:68001`: Job request #1 (transcribe podcast #1)
|
### `kind:68001`: Job request #1 (transcribe podcast #1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user