diff --git a/.spectral.yml b/.spectral.yml index 90b28f11..768d37ae 100644 --- a/.spectral.yml +++ b/.spectral.yml @@ -1,18 +1,8 @@ extends: ["spectral:oas", "spectral:asyncapi"] overrides: - files: - - "openapi.yml#/components/schemas/TranscriptParams/example" - - "openapi.yml#/components/schemas/TranscriptList/example" - - "openapi.yml#/components/schemas/LemurSummaryResponse/example" - - "openapi.yml#/components/schemas/LemurSummaryParams/example" - - "openapi.yml#/components/schemas/LemurQuestionAnswerResponse/example" - - "openapi.yml#/components/schemas/LemurQuestionAnswerParams/example" - - "openapi.yml#/components/schemas/LemurActionItemsResponse/example" - - "openapi.yml#/components/schemas/LemurActionItemsParams/example" - - "openapi.yml#/components/schemas/LemurTaskParams/example" - - "openapi.yml#/components/schemas/LemurTaskResponse/example" - - "asyncapi.yml#/components/schemas/PartialTranscript/examples" - - "asyncapi.yml#/components/schemas/FinalTranscript/examples" + - "openapi.yml" + - "asyncapi.yml" rules: oas3-valid-schema-example: "off" asyncapi-payload-examples: "off" diff --git a/fern/.definition/lemur.yml b/fern/.definition/lemur.yml index d3efc85b..23d66343 100644 --- a/fern/.definition/lemur.yml +++ b/fern/.definition/lemur.yml @@ -401,20 +401,25 @@ types: usage: type: LemurUsage docs: The usage numbers for the LeMUR request - LemurTaskResponse: + LemurStringResponse: properties: response: type: string docs: The response generated by LeMUR. extends: - LemurBaseResponse + LemurTaskResponse: + properties: {} + extends: + - LemurStringResponse LemurSummaryResponse: - properties: - response: - type: string - docs: The response generated by LeMUR + properties: {} extends: - - LemurBaseResponse + - LemurStringResponse + LemurActionItemsResponse: + properties: {} + extends: + - LemurStringResponse LemurQuestionAnswerResponse: properties: response: @@ -431,20 +436,11 @@ types: answer: type: string docs: The answer generated by LeMUR - LemurActionItemsResponse: - properties: - response: - type: string - docs: The response generated by LeMUR - extends: - - LemurBaseResponse LemurResponse: discriminated: false union: - - LemurTaskResponse - - LemurSummaryResponse + - LemurStringResponse - LemurQuestionAnswerResponse - - LemurActionItemsResponse LemurBaseParamsContext: discriminated: false docs: >- diff --git a/fern/.definition/transcripts.yml b/fern/.definition/transcripts.yml index 358e0ba6..e2fde92a 100644 --- a/fern/.definition/transcripts.yml +++ b/fern/.definition/transcripts.yml @@ -2392,6 +2392,11 @@ types: speech_model: optional webhook_url: type: optional + docs: >- + The URL to which we send webhook requests. We sends two different + types of webhook requests. One request when a transcript is completed + or failed, and one request when the redacted audio is ready if + redact_pii_audio is enabled. validation: format: url webhook_auth_header_name: diff --git a/fern/openapi-overrides.yml b/fern/openapi-overrides.yml index 96b6335c..2a9de305 100644 --- a/fern/openapi-overrides.yml +++ b/fern/openapi-overrides.yml @@ -21,3 +21,22 @@ components: properties: final_model: $ref: "#/components/schemas/LemurModel" + LemurTaskResponse: + allOf: + - $ref: "#/components/schemas/LemurStringResponse" + # required to force Fern to keep the LemurTaskResponse class around and not use LemurStringResponse directly + - type: object + additionalProperties: false + LemurSummaryResponse: + allOf: + - $ref: "#/components/schemas/LemurStringResponse" + # required to force Fern to keep the LemurSummaryResponse class around and not use LemurStringResponse directly + - type: object + additionalProperties: false + + LemurActionItemsResponse: + allOf: + - $ref: "#/components/schemas/LemurStringResponse" + # required to force Fern to keep the LemurActionItemsResponse class around and not use LemurStringResponse directly + - type: object + additionalProperties: false diff --git a/openapi.json b/openapi.json index f1086553..3877087d 100644 --- a/openapi.json +++ b/openapi.json @@ -1636,7 +1636,8 @@ ] }, "webhook_url": { - "x-label": "Webhook URL The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.", + "x-label": "Webhook URL", + "description": "The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.", "type": "string", "format": "url" }, @@ -6062,8 +6063,8 @@ } } }, - "LemurTaskResponse": { - "x-label": "LeMUR task response", + "LemurStringResponse": { + "x-label": "LeMUR string response", "x-fern-sdk-group-name": "lemur", "type": "object", "allOf": [ @@ -6092,25 +6093,31 @@ } } }, + "LemurTaskResponse": { + "x-label": "LeMUR task response", + "x-fern-sdk-group-name": "lemur", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/LemurStringResponse" + } + ], + "example": { + "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e", + "response": "Based on the transcript, the following locations were mentioned as being affected by wildfire smoke from Canada:\n\n- Maine\n- Maryland\n- Minnesota\n- Mid Atlantic region\n- Northeast region\n- New York City\n- Baltimore\n", + "usage": { + "input_tokens": 27, + "output_tokens": 3 + } + } + }, "LemurSummaryResponse": { "x-label": "LeMUR summary response", "x-fern-sdk-group-name": "lemur", "type": "object", "allOf": [ { - "$ref": "#/components/schemas/LemurBaseResponse" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "response": { - "x-label": "Response", - "description": "The response generated by LeMUR", - "type": "string" - } - }, - "required": ["response"] + "$ref": "#/components/schemas/LemurStringResponse" } ], "example": { @@ -6122,6 +6129,24 @@ } } }, + "LemurActionItemsResponse": { + "x-label": "LeMUR action items response", + "x-fern-sdk-group-name": "lemur", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/LemurStringResponse" + } + ], + "example": { + "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e", + "response": "Here are some potential action items based on the transcript:\n\n- Monitor air quality levels in affected areas and issue warnings as needed.\n\n- Advise vulnerable populations like children, the elderly, and those with respiratory conditions to limit time outdoors.\n\n- Have schools cancel outdoor activities when air quality is poor.\n\n- Educate the public on health impacts of smoke inhalation and precautions to take.\n\n- Track progression of smoke plumes using weather and air quality monitoring systems.\n\n- Coordinate cross-regionally to manage smoke exposure as air masses shift.\n\n- Plan for likely increase in such events due to climate change. Expand monitoring and forecasting capabilities.\n\n- Conduct research to better understand health impacts of wildfire smoke and mitigation strategies.\n\n- Develop strategies to prevent and manage wildfires to limit air quality impacts.\n", + "usage": { + "input_tokens": 27, + "output_tokens": 3 + } + } + }, "LemurQuestionAnswerResponse": { "x-label": "LeMUR question & answer response", "x-fern-sdk-group-name": "lemur", @@ -6189,52 +6214,16 @@ "question": "Where are there wildfires?" } }, - "LemurActionItemsResponse": { - "x-label": "LeMUR action items response", - "x-fern-sdk-group-name": "lemur", - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/LemurBaseResponse" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "response": { - "x-label": "Response", - "description": "The response generated by LeMUR", - "type": "string" - } - }, - "required": ["response"] - } - ], - "example": { - "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e", - "response": "Here are some potential action items based on the transcript:\n\n- Monitor air quality levels in affected areas and issue warnings as needed.\n\n- Advise vulnerable populations like children, the elderly, and those with respiratory conditions to limit time outdoors.\n\n- Have schools cancel outdoor activities when air quality is poor.\n\n- Educate the public on health impacts of smoke inhalation and precautions to take.\n\n- Track progression of smoke plumes using weather and air quality monitoring systems.\n\n- Coordinate cross-regionally to manage smoke exposure as air masses shift.\n\n- Plan for likely increase in such events due to climate change. Expand monitoring and forecasting capabilities.\n\n- Conduct research to better understand health impacts of wildfire smoke and mitigation strategies.\n\n- Develop strategies to prevent and manage wildfires to limit air quality impacts.\n", - "usage": { - "input_tokens": 27, - "output_tokens": 3 - } - } - }, "LemurResponse": { "x-label": "LeMUR response", "x-fern-sdk-group-name": "lemur", "type": "object", "oneOf": [ { - "$ref": "#/components/schemas/LemurTaskResponse" - }, - { - "$ref": "#/components/schemas/LemurSummaryResponse" + "$ref": "#/components/schemas/LemurStringResponse" }, { "$ref": "#/components/schemas/LemurQuestionAnswerResponse" - }, - { - "$ref": "#/components/schemas/LemurActionItemsResponse" } ] }, diff --git a/openapi.yml b/openapi.yml index 5ba24213..b79b93c7 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1238,7 +1238,7 @@ components: webhook_url: x-label: Webhook URL - The URL to which we send webhook requests. + description: The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled. type: string @@ -5186,8 +5186,8 @@ components: "usage": { "input_tokens": 27, "output_tokens": 3 }, } - LemurTaskResponse: - x-label: LeMUR task response + LemurStringResponse: + x-label: LeMUR string response x-fern-sdk-group-name: lemur type: object allOf: @@ -5214,20 +5214,32 @@ components: - Baltimore usage: { "input_tokens": 27, "output_tokens": 3 } + LemurTaskResponse: + x-label: LeMUR task response + x-fern-sdk-group-name: lemur + type: object + allOf: + - $ref: "#/components/schemas/LemurStringResponse" + example: + request_id: "5e1b27c2-691f-4414-8bc5-f14678442f9e" + response: | + Based on the transcript, the following locations were mentioned as being affected by wildfire smoke from Canada: + + - Maine + - Maryland + - Minnesota + - Mid Atlantic region + - Northeast region + - New York City + - Baltimore + usage: { "input_tokens": 27, "output_tokens": 3 } + LemurSummaryResponse: x-label: LeMUR summary response x-fern-sdk-group-name: lemur type: object allOf: - - $ref: "#/components/schemas/LemurBaseResponse" - - type: object - additionalProperties: false - properties: - response: - x-label: Response - description: The response generated by LeMUR - type: string - required: [response] + - $ref: "#/components/schemas/LemurStringResponse" example: request_id: "5e1b27c2-691f-4414-8bc5-f14678442f9e" response: | @@ -5242,6 +5254,36 @@ components: - Climate change is leading to longer and more severe fire seasons. Events of smoke traveling long distances and affecting air quality over wide areas will likely become more common in the future." usage: { "input_tokens": 27, "output_tokens": 3 } + LemurActionItemsResponse: + x-label: LeMUR action items response + x-fern-sdk-group-name: lemur + type: object + allOf: + - $ref: "#/components/schemas/LemurStringResponse" + example: + request_id: "5e1b27c2-691f-4414-8bc5-f14678442f9e" + response: | + Here are some potential action items based on the transcript: + + - Monitor air quality levels in affected areas and issue warnings as needed. + + - Advise vulnerable populations like children, the elderly, and those with respiratory conditions to limit time outdoors. + + - Have schools cancel outdoor activities when air quality is poor. + + - Educate the public on health impacts of smoke inhalation and precautions to take. + + - Track progression of smoke plumes using weather and air quality monitoring systems. + + - Coordinate cross-regionally to manage smoke exposure as air masses shift. + + - Plan for likely increase in such events due to climate change. Expand monitoring and forecasting capabilities. + + - Conduct research to better understand health impacts of wildfire smoke and mitigation strategies. + + - Develop strategies to prevent and manage wildfires to limit air quality impacts. + usage: { "input_tokens": 27, "output_tokens": 3 } + LemurQuestionAnswerResponse: x-label: LeMUR question & answer response x-fern-sdk-group-name: lemur @@ -5291,53 +5333,13 @@ components: required: [question, answer] example: { answer: "CA, US", question: "Where are there wildfires?" } - LemurActionItemsResponse: - x-label: LeMUR action items response - x-fern-sdk-group-name: lemur - type: object - allOf: - - $ref: "#/components/schemas/LemurBaseResponse" - - type: object - additionalProperties: false - properties: - response: - x-label: Response - description: The response generated by LeMUR - type: string - required: [response] - example: - request_id: "5e1b27c2-691f-4414-8bc5-f14678442f9e" - response: | - Here are some potential action items based on the transcript: - - - Monitor air quality levels in affected areas and issue warnings as needed. - - - Advise vulnerable populations like children, the elderly, and those with respiratory conditions to limit time outdoors. - - - Have schools cancel outdoor activities when air quality is poor. - - - Educate the public on health impacts of smoke inhalation and precautions to take. - - - Track progression of smoke plumes using weather and air quality monitoring systems. - - - Coordinate cross-regionally to manage smoke exposure as air masses shift. - - - Plan for likely increase in such events due to climate change. Expand monitoring and forecasting capabilities. - - - Conduct research to better understand health impacts of wildfire smoke and mitigation strategies. - - - Develop strategies to prevent and manage wildfires to limit air quality impacts. - usage: { "input_tokens": 27, "output_tokens": 3 } - LemurResponse: x-label: LeMUR response x-fern-sdk-group-name: lemur type: object oneOf: - - $ref: "#/components/schemas/LemurTaskResponse" - - $ref: "#/components/schemas/LemurSummaryResponse" + - $ref: "#/components/schemas/LemurStringResponse" - $ref: "#/components/schemas/LemurQuestionAnswerResponse" - - $ref: "#/components/schemas/LemurActionItemsResponse" LemurBaseParams: x-label: LeMUR base parameters