Skip to content

Commit

Permalink
Add URL and external ID search fields (#113)
Browse files Browse the repository at this point in the history
* add search

* tidy
  • Loading branch information
jackfischer authored Dec 12, 2024
1 parent 1baefb0 commit 920c86f
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 39 deletions.
2 changes: 1 addition & 1 deletion fern/definition/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ auth-schemes:
scheme: bearer
token:
name: apiKey
# Support environment variable scanning, defaulting to CREDAI_API_KEY if
# Support environment variable scanning, defaulting to CREDAI_API_KEY if
# an api key is not explicitly passed into the generated SDK client.
env: CREDAL_API_KEY
environments:
Expand Down
88 changes: 50 additions & 38 deletions fern/definition/copilots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,18 @@ service:
agentId: 82e4b12a-6990-45d4-8ebd-85c00e030c24
message: Is Credal SOC 2 compliant?
userEmail: [email protected]
inputVariables: [
{
name: "input1", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c24],
},
{
name: "input2", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c25, 82e4b12a-6990-45d4-8ebd-85c00e030c26],
}
]
inputVariables:
[
{ name: "input1", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c24] },
{
name: "input2",
ids:
[
82e4b12a-6990-45d4-8ebd-85c00e030c25,
82e4b12a-6990-45d4-8ebd-85c00e030c26,
],
},
]
response:
body:
sendChatResult:
Expand Down Expand Up @@ -187,7 +191,7 @@ service:
url: "https://drive.google.com/file/d/123457/view",
},
]
webSearchResults:
webSearchResults:
[
{
title: "SOC 2 Compliance",
Expand Down Expand Up @@ -239,21 +243,25 @@ service:
copilotId: 82e4b12a-6990-45d4-8ebd-85c00e030c24
message: Is Credal SOC 2 compliant?
email: [email protected]
inputVariables: [
{
name: "input1", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c24],
},
{
name: "input2", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c25, 82e4b12a-6990-45d4-8ebd-85c00e030c26],
}
]
inputVariables:
[
{ name: "input1", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c24] },
{
name: "input2",
ids:
[
82e4b12a-6990-45d4-8ebd-85c00e030c25,
82e4b12a-6990-45d4-8ebd-85c00e030c26,
],
},
]
response:
stream:
- event: initial
data:
event: initial
conversationId: fc938005-92db-411a-88eb-32ca50d5f744
webSearchResults:
webSearchResults:
[
{
title: "SOC 2 Compliance",
Expand All @@ -265,18 +273,18 @@ service:
- event: data_chunk
data:
event: data_chunk
chunk: Based on
chunk: Based on
- event: data_chunk
data:
event: data_chunk
chunk: the context provided,
event: data_chunk
chunk: the context provided,
- event: data_chunk
data:
event: data_chunk
event: data_chunk
chunk: Credal is SOC 2 compliant.
- event: final_chunk
data:
event: final_chunk
event: final_chunk
sources:
[
{
Expand All @@ -295,19 +303,23 @@ service:
copilotId: 82e4b12a-6990-45d4-8ebd-85c00e030c24
message: Is this user eligible for benefits based on their date of birth?
email: [email protected]
inputVariables: [
{
name: "input1", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c26],
},
{
name: "input2", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c25, 82e4b12a-6990-45d4-8ebd-85c00e030c24],
}
]
inputVariables:
[
{ name: "input1", ids: [82e4b12a-6990-45d4-8ebd-85c00e030c26] },
{
name: "input2",
ids:
[
82e4b12a-6990-45d4-8ebd-85c00e030c25,
82e4b12a-6990-45d4-8ebd-85c00e030c24,
],
},
]
response:
stream:
- event: blocked
data:
event: blocked
event: blocked
conversationId: fc938005-92db-411a-88eb-32ca50d5f744
policyTriggers: []
warnings: []
Expand Down Expand Up @@ -437,7 +449,7 @@ types:
docs: |
Returned when Credal detects possible
infosec violations and blocks the message.
InputVariable:
properties:
name: string
Expand Down Expand Up @@ -526,7 +538,7 @@ types:
field: string
operator: common.Operator
value: string

NumberFieldSchema:
properties:
field: string
Expand Down Expand Up @@ -564,22 +576,22 @@ types:
semanticSearchTerms: list<string>
webSearchTerm: list<string>
filteredDataSourcesPerCollection: list<CollectionFilteredData>

InitialChunk:
properties:
conversationId: string
warnings: list<string>
webSearchResults: list<WebSearchResult>
dataFilters: optional<DataFilter>

DataChunk:
properties:
chunk: string

FinalChunk:
properties:
sources: list<ReferencedSource>

BlockedChunk:
properties:
conversationId: uuid
Expand All @@ -593,4 +605,4 @@ types:
initial: InitialChunk
data_chunk: DataChunk
final_chunk: FinalChunk
blocked: BlockedChunk
blocked: BlockedChunk
6 changes: 6 additions & 0 deletions fern/definition/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ service:
results:
- documentId: 82e4b12a-6990-45d4-8ebd-85c00e030c24
documentName: "ABC Corp - Initial meeting transcript"
documentUrl: "https://docs.google.com/document/d/1PNiSvrRKyO4Yfv1IMnPkI1JTZr-762Rd7pRdygBi0eE/edit"
documentExternalId: "1PNiSvrRKyO4Yfv1IMnPkI1JTZr-762Rd7pRdygBi0eE"
documentMetadata:
customerName: "ABC Corp"
meetingDate: "2021-01-01T00:00:00Z"
Expand All @@ -79,6 +81,8 @@ service:
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.
- documentId: 90998ceb-1c10-4d2a-96cb-acf89fa3005e
documentName: "XYZ Corp - Follow-up transcript"
documentUrl: "https://credalai-my.sharepoint.com/:w:/g/credalai_onmicrosoft_com/ESb7bpzm2FdGqPTlXsQW2P4BpBhsrZuKS_PgJlaoJffo9A?e=Ecv5j1"
documentExternalId: "ESb7bpzm2FdGqPTlXsQW2P4BpBhsrZuKS_PgJlaoJffo9A"
documentMetadata:
customerName: "XYZ Corp"
meetingDate: "2021-01-02T00:00:00Z"
Expand Down Expand Up @@ -134,6 +138,8 @@ types:
properties:
documentId: uuid
documentName: string
documentUrl: string
documentExternalId: string
documentMetadata: map<string, string>
chunks: list<SearchResultChunk>
mergedContents: optional<string>
Expand Down

0 comments on commit 920c86f

Please sign in to comment.