Skip to content

Commit 6e239cf

Browse files
Kapil GowruKapil Gowru
authored andcommitted
feat: adding self host and mcp server
1 parent 7d4294e commit 6e239cf

File tree

277 files changed

+5355
-6755
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+5355
-6755
lines changed

.github/workflows/check-links.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/update-versions.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ jobs:
2626
run: curl -s "https://registry.hub.docker.com/v2/repositories/fernapi/fern-ruby-sdk/tags" | jq -r -j '[.results[] | select(.name != "latest")] | .[0].name' > fern/snippets/version-number-ruby.mdx
2727
- name: update-ts-version
2828
run: curl -s "https://registry.hub.docker.com/v2/repositories/fernapi/fern-typescript-sdk/tags" | jq -r -j '[.results[] | select(.name != "latest")] | .[0].name' > fern/snippets/version-number-ts.mdx
29-
- name: update-swift-version
30-
run: curl -s "https://registry.hub.docker.com/v2/repositories/fernapi/fern-swift-sdk/tags" | jq -r -j '[.results[] | select(.name != "latest")] | .[0].name' > fern/snippets/version-number-swift.mdx
3129
- name: create PR
3230
id: cpr
3331
uses: peter-evans/create-pull-request@v7

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Keep the following principles in mind:
5454
- **Use [Fern’s documentation components](https://buildwithfern.com/learn/docs/writing-content/components/overview)** whenever you can.
5555
- **When editing an existing page** - Match the existing heading structure, tone, and level of detail to ensure your changes integrate as seamlessly as possible.
5656
- **Use diagrams when it makes sense** – Show, don't tell! Use [Mermaid](https://buildwithfern.com/learn/docs/writing-content/markdown#diagrams), a Markdown-like diagramming syntax, to illustrate a workflow.
57-
- [**Use sentence case**](https://developers.google.com/style/capitalization) for page and section headings.
5857

5958
> "Break any of these rules sooner than say anything outright barbarous."
6059
>

examples/typescript-sdk/generators.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

examples/typescript-sdk/typescript-publish.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
docs: FAI Analytics API
2+
3+
imports:
4+
commons: ./commons.yml
5+
6+
service:
7+
auth: false
8+
base-path: /analytics
9+
endpoints:
10+
getHistogramAnalytics:
11+
docs: Retrieve the usage histogram analytics for a given period
12+
path: /histogram/{domain}
13+
method: GET
14+
audiences:
15+
- internal
16+
path-parameters:
17+
domain: string
18+
request:
19+
name: GetHistogramAnalyticsRequest
20+
query-parameters:
21+
start_date:
22+
type: optional<datetime>
23+
docs: The start date of the period to retrieve analytics for
24+
end_date:
25+
type: optional<datetime>
26+
docs: The end date of the period to retrieve analytics for
27+
groupBy:
28+
type: GroupBy
29+
docs: The field to group the analytics by
30+
response: HistogramAnalytics
31+
errors:
32+
- commons.BadRequestError
33+
- commons.InternalError
34+
getInsights:
35+
docs: Retrieve the insights for a given period
36+
path: /insights/{domain}
37+
method: GET
38+
audiences:
39+
- internal
40+
path-parameters:
41+
domain: string
42+
request:
43+
name: GetInsightsRequest
44+
query-parameters:
45+
start_date:
46+
type: optional<datetime>
47+
docs: The start date of the period to retrieve analytics for
48+
end_date:
49+
type: optional<datetime>
50+
docs: The end date of the period to retrieve analytics for
51+
response: Insights
52+
errors:
53+
- commons.BadRequestError
54+
- commons.InternalError
55+
56+
types:
57+
GroupBy:
58+
enum:
59+
- "DAY"
60+
- "WEEK"
61+
- "MONTH"
62+
63+
HistogramAnalytics:
64+
properties:
65+
bars: list<HistogramAnalyticsBar>
66+
67+
HistogramAnalyticsBar:
68+
properties:
69+
label: string
70+
queryCount: integer
71+
conversationCount: integer
72+
73+
Insights:
74+
properties:
75+
insights: list<Insight>
76+
77+
Insight:
78+
properties:
79+
insightText: string
80+
numberOfQueries: integer
81+
examples: list<string>
82+

fern/apis/fai/definition/api.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: fai
2+
auth: bearer
3+
default-environment: Prod
4+
environments:
5+
Prod: https://fai.buildwithfern.com
6+
error-discrimination:
7+
strategy: property
8+
property-name: error

fern/apis/fai/definition/chat.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
docs: FAI Chat API
2+
3+
imports:
4+
commons: ./commons.yml
5+
6+
service:
7+
auth: false
8+
base-path: /chat
9+
endpoints:
10+
chatCompletion:
11+
docs: Create a docs chat completion for a given domain
12+
path: /{domain}
13+
method: POST
14+
audiences:
15+
- customers
16+
path-parameters:
17+
domain: string
18+
request:
19+
name: ChatCompletionRequest
20+
body:
21+
properties:
22+
model: optional<string>
23+
system_prompt: optional<string>
24+
messages: list<ChatTurn>
25+
response: ChatCompletionResponse
26+
errors:
27+
- commons.BadRequestError
28+
- commons.InternalError
29+
30+
types:
31+
ChatCompletionResponse:
32+
type: list<ChatTurn>
33+
34+
ChatTurn:
35+
properties:
36+
role: string
37+
content: string
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json
2+
errors:
3+
BadRequestError:
4+
status-code: 400
5+
type: string
6+
7+
InternalError:
8+
status-code: 401
9+
type: string
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
docs: FAI Conversations API
2+
3+
imports:
4+
commons: ./commons.yml
5+
6+
service:
7+
auth: false
8+
base-path: /conversations
9+
endpoints:
10+
getConversation:
11+
docs: Retrieve a complete conversation by conversation id
12+
path: /{domain}/{conversation_id}
13+
method: GET
14+
audiences:
15+
- customers
16+
path-parameters:
17+
domain: string
18+
conversation_id: string
19+
response: Conversation
20+
errors:
21+
- commons.BadRequestError
22+
- commons.InternalError
23+
24+
types:
25+
Conversation:
26+
properties:
27+
conversation_id: string
28+
created_at: datetime
29+
turns: list<ConversationTurn>
30+
31+
Conversations:
32+
type: list<Conversation>
33+
34+
ConversationSource:
35+
default: CHAT
36+
enum:
37+
- CHAT
38+
- MCP
39+
40+
ConversationTurn:
41+
properties:
42+
role: string
43+
text: string
44+
created_at: datetime

0 commit comments

Comments
 (0)