Skip to content

Commit

Permalink
docs: change JAN_URL to localhost:1337
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHieu01 committed Nov 30, 2023
1 parent fc9ce39 commit 668078c
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions docs/openapi/jan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ paths:
x-codeSamples:
- lang: "cURL"
source: |
curl -X POST {JAN_URL}/v1/threads \
curl -X POST http://localhost:1337/v1/threads \
-H "Content-Type: application/json" \
-d '{
"messages": [{
Expand Down Expand Up @@ -299,7 +299,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl {JAN_URL}/v1/threads \
curl http://localhost:1337/v1/threads \
-H "Content-Type: application/json" \
/threads/{thread_id}:
Expand Down Expand Up @@ -330,7 +330,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl {JAN_URL}/v1/threads/{thread_id}
curl http://localhost:1337/v1/threads/{thread_id}
post:
operationId: modifyThread
tags:
Expand Down Expand Up @@ -370,7 +370,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl -X POST {JAN_URL}/v1/threads/{thread_id} \
curl -X POST http://localhost:1337/v1/threads/{thread_id} \
-H "Content-Type: application/json" \
-d '{
"messages": [{
Expand All @@ -382,7 +382,6 @@ paths:
"content": "How does AI work? Explain it in simple terms."
}]
}'
delete:
operationId: deleteThread
tags:
Expand All @@ -399,7 +398,6 @@ paths:
example: thread_abc123
description: |
The ID of the thread to be deleted.
responses:
"200":
description: Thread deleted successfully
Expand All @@ -410,8 +408,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl -X DELETE {JAN_URL}/v1/threads/{thread_id}
curl -X DELETE http://localhost:1337/v1/threads/{thread_id}
/threads/{thread_id}/assistants:
get:
Expand All @@ -420,8 +417,6 @@ paths:
- Threads
summary: Get Thread.Assistants
description: |
Can achieve this goal by calling Get thread API
parameters:
- in: path
Expand All @@ -441,7 +436,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl {JAN_URL}/v1/threads/{thread_id}/assistants
curl http://localhost:1337/v1/threads/{thread_id}/assistants
/threads/{thread_id}/assistants/{assistants_id}:
post:
Expand All @@ -461,8 +456,6 @@ paths:
- Threads
summary: List Thread.Messages
description: |
Can achieve this goal by calling Get Thread API
parameters:
- in: path
Expand All @@ -482,7 +475,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl {JAN_URL}/v1/threads/{thread_id}
curl http://localhost:1337/v1/threads/{thread_id}
### MESSAGES
/threads/{thread_id}/messages:
Expand All @@ -502,7 +495,6 @@ paths:
example: thread_abc123
description: |
The ID of the thread from which to retrieve messages.
responses:
"200":
description: List of messages retrieved successfully
Expand All @@ -513,7 +505,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl {JAN_URL}/v1/threads/{thread_id}/messages \
curl http://localhost:1337/v1/threads/{thread_id}/messages \
-H "Content-Type: application/json"
post:
operationId: createMessage
Expand All @@ -531,7 +523,6 @@ paths:
example: thread_abc123
description: |
The ID of the thread to which the message will be posted.
requestBody:
required: true
content:
Expand Down Expand Up @@ -567,7 +558,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl -X POST {JAN_URL}/v1/threads/{thread_id}/messages \
curl -X POST http://localhost:1337/v1/threads/{thread_id}/messages \
-H "Content-Type: application/json" \
-d '{
"role": "user",
Expand Down Expand Up @@ -611,7 +602,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl {JAN_URL}/v1/threads/{thread_id}/messages/{message_id} \
curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id} \
-H "Content-Type: application/json"
/threads/{thread_id}/messages/{message_id}/files:
Expand Down Expand Up @@ -652,7 +643,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl {JAN_URL}/v1/threads/{thread_id}/messages/{message_id}/files \
curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files \
-H "Content-Type: application/json"
/threads/{thread_id}/messages/{message_id}/files/{file_id}:
Expand Down Expand Up @@ -701,7 +692,7 @@ paths:
x-codeSamples:
- lang: "curl"
source: |
curl {JAN_URL}/v1/threads/{thread_id}/messages/{message_id}/files/{file_id} \
curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files/{file_id} \
-H "Content-Type: application/json"
x-webhooks:
Expand Down

0 comments on commit 668078c

Please sign in to comment.