Skip to content

Commit

Permalink
oauth placeholder and search feedback (#6)
Browse files Browse the repository at this point in the history
* oauth placeholder and search feedback

* make oauth page show up

* Update fern/docs/pages/guides/oauth.mdx

Co-authored-by: Thomas Mathew <[email protected]>

---------

Co-authored-by: Thomas Mathew <[email protected]>
  • Loading branch information
benauriemma and tmathew0309 authored Nov 8, 2023
1 parent 46aa112 commit 7fd1889
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
41 changes: 40 additions & 1 deletion fern/definition/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ service:
maxResults: 5
response:
body:
searchId: 76b4cdda-5d5c-11ee-b268-cb249f5be4f9
results:
- documentId: 82e4b12a-6990-45d4-8ebd-85c00e030c24
documentName: "ABC Corp - Initial meeting transcript"
Expand Down Expand Up @@ -59,6 +60,7 @@ service:
threshold: 0.8
response:
body:
searchId: 76b534be-5d5c-11ee-b268-87f1fd934c81
results:
- documentId: 82e4b12a-6990-45d4-8ebd-85c00e030c24
documentName: "ABC Corp - Initial meeting transcript"
Expand Down Expand Up @@ -98,7 +100,35 @@ service:
text: "sunt in culpa qui officia deserunt mollit anim id est laborum."
score: 0.75
mergedContents: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore. sunt in culpa qui officia deserunt mollit anim id est laborum.

submitSearchFeedback:
path: /submitSearchFeedback
docs: Submit end-user feedback on a search result to be persisted on the audit log
method: POST
request:
name: SubmitSearchFeedbackRequest
body:
properties:
searchId:
type: uuid
docs: |
UUID of the search response that this feedback is for
feedback:
type: Feedback
userEmail:
type: optional<string>
comments:
type: optional<string>
response: SubmitSearchFeedbackResponse
examples:
- name: submitSearchFeedback
request:
searchId: 82e4b12a-6990-45d4-8ebd-85c00e030c24
feedback: "THUMBS_UP"
userEmail: "[email protected]"
comments: "There's something relevant about 2FA in the document that wasn't included in the search results"
response:
body:
auditLogId: 13c18750-5bc1-11ee-a8d5-733be8e2f38c
types:
CatalogSearchOptions:
properties:
Expand All @@ -112,6 +142,7 @@ types:
Whether to search the contents of the document. Defaults to false.
SearchDocumentCatalogResponse:
properties:
searchId: uuid
results: list<CatalogSearchResult>
CatalogSearchResult:
properties:
Expand All @@ -134,6 +165,7 @@ types:
Defaults to 0.75.
SearchDocumentCollectionResponse:
properties:
searchId: uuid
results: list<DocumentCollectionSearchResult>
DocumentCollectionSearchResult:
properties:
Expand All @@ -142,6 +174,9 @@ types:
documentMetadata: map<string, string>
chunks: list<SearchResultChunk>
mergedContents: optional<string>
SubmitSearchFeedbackResponse:
properties:
auditLogId: uuid
SearchResultChunk:
properties:
chunkId: uuid
Expand All @@ -151,3 +186,7 @@ types:
type: double
docs: |
The similarity score between 0 and 1 for the search result. A higher number means the chunk is more relevant to the search query.
Feedback:
enum:
- THUMBS_UP
- THUMBS_DOWN
2 changes: 2 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ navigation:
path: ./docs/pages/guides/overview.mdx
- page: Copilots
path: ./docs/pages/guides/copilots.mdx
- page: OAuth
path: ./docs/pages/guides/oauth.mdx
- api: API Reference

navbar-links:
Expand Down
4 changes: 4 additions & 0 deletions fern/docs/pages/guides/oauth.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<Callout intent="warning">
Credal's OAuth flow for API access is in private Beta. Contact Credal to get started.
</Callout>

0 comments on commit 7fd1889

Please sign in to comment.