Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 0 additions & 82 deletions .github/workflows/check-links.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/update-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
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
- name: update-ts-version
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
- name: update-swift-version
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
- name: create PR
id: cpr
uses: peter-evans/create-pull-request@v7
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Keep the following principles in mind:
- **Use [Fern’s documentation components](https://buildwithfern.com/learn/docs/writing-content/components/overview)** whenever you can.
- **When editing an existing page** - Match the existing heading structure, tone, and level of detail to ensure your changes integrate as seamlessly as possible.
- **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.
- [**Use sentence case**](https://developers.google.com/style/capitalization) for page and section headings.

> "Break any of these rules sooner than say anything outright barbarous."
>
Expand Down
82 changes: 82 additions & 0 deletions fern/apis/fai/definition/analytics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
docs: FAI Analytics API

imports:
commons: ./commons.yml

service:
auth: false
base-path: /analytics
endpoints:
getHistogramAnalytics:
docs: Retrieve the usage histogram analytics for a given period
path: /histogram/{domain}
method: GET
audiences:
- internal
path-parameters:
domain: string
request:
name: GetHistogramAnalyticsRequest
query-parameters:
start_date:
type: optional<datetime>
docs: The start date of the period to retrieve analytics for
end_date:
type: optional<datetime>
docs: The end date of the period to retrieve analytics for
groupBy:
type: GroupBy
docs: The field to group the analytics by
response: HistogramAnalytics
errors:
- commons.BadRequestError
- commons.InternalError
getInsights:
docs: Retrieve the insights for a given period
path: /insights/{domain}
method: GET
audiences:
- internal
path-parameters:
domain: string
request:
name: GetInsightsRequest
query-parameters:
start_date:
type: optional<datetime>
docs: The start date of the period to retrieve analytics for
end_date:
type: optional<datetime>
docs: The end date of the period to retrieve analytics for
response: Insights
errors:
- commons.BadRequestError
- commons.InternalError

types:
GroupBy:
enum:
- "DAY"
- "WEEK"
- "MONTH"

HistogramAnalytics:
properties:
bars: list<HistogramAnalyticsBar>

HistogramAnalyticsBar:
properties:
label: string
queryCount: integer
conversationCount: integer

Insights:
properties:
insights: list<Insight>

Insight:
properties:
insightText: string
numberOfQueries: integer
examples: list<string>

8 changes: 8 additions & 0 deletions fern/apis/fai/definition/api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: fai
auth: bearer
default-environment: Prod
environments:
Prod: https://fai.buildwithfern.com
error-discrimination:
strategy: property
property-name: error
37 changes: 37 additions & 0 deletions fern/apis/fai/definition/chat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
docs: FAI Chat API

imports:
commons: ./commons.yml

service:
auth: false
base-path: /chat
endpoints:
chatCompletion:
docs: Create a docs chat completion for a given domain
path: /{domain}
method: POST
audiences:
- customers
path-parameters:
domain: string
request:
name: ChatCompletionRequest
body:
properties:
model: optional<string>
system_prompt: optional<string>
messages: list<ChatTurn>
response: ChatCompletionResponse
errors:
- commons.BadRequestError
- commons.InternalError

types:
ChatCompletionResponse:
type: list<ChatTurn>

ChatTurn:
properties:
role: string
content: string
9 changes: 9 additions & 0 deletions fern/apis/fai/definition/commons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=https://github.com/raw/fern-api/fern/main/fern.schema.json
errors:
BadRequestError:
status-code: 400
type: string

InternalError:
status-code: 401
type: string
44 changes: 44 additions & 0 deletions fern/apis/fai/definition/conversations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
docs: FAI Conversations API

imports:
commons: ./commons.yml

service:
auth: false
base-path: /conversations
endpoints:
getConversation:
docs: Retrieve a complete conversation by conversation id
path: /{domain}/{conversation_id}
method: GET
audiences:
- customers
path-parameters:
domain: string
conversation_id: string
response: Conversation
errors:
- commons.BadRequestError
- commons.InternalError

types:
Conversation:
properties:
conversation_id: string
created_at: datetime
turns: list<ConversationTurn>

Conversations:
type: list<Conversation>

ConversationSource:
default: CHAT
enum:
- CHAT
- MCP

ConversationTurn:
properties:
role: string
text: string
created_at: datetime
Loading
Loading