-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
342 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# pylint: disable=line-too-long | ||
"""Module providing a functions for using OpenAI function calling.""" | ||
TOOLS = [ | ||
{ | ||
"type": "function", | ||
"function": { | ||
"name": "add_start_dates", | ||
"description": "this function extracts the start date", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"output": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"description": "a date in the format YYYYMMDDT0000 and if not available N/A", | ||
}, | ||
}, | ||
}, | ||
"required": ["output"], | ||
}, | ||
}, | ||
}, | ||
{ | ||
"type": "function", | ||
"function": { | ||
"name": "add_end_dates", | ||
"description": "this function extracts the end date", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"output": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"description": "a end date in the format YYYYMMDDT0000", | ||
}, | ||
}, | ||
}, | ||
"required": ["output"], | ||
}, | ||
}, | ||
}, | ||
{ | ||
"type": "function", | ||
"function": { | ||
"name": "add_duration", | ||
"description": "this function extracts the duration", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"output": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"description": "a duration in the format HHH:MM:SS or HH:MM:SS", | ||
}, | ||
}, | ||
}, | ||
"required": ["output"], | ||
}, | ||
}, | ||
}, | ||
{ | ||
"type": "function", | ||
"function": { | ||
"name": "add_event_type", | ||
"description": "this function extracts the event type", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"output": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"description": "an event type (one of 'Symptom Onset', 'Symptom Offset', 'Diagnosis', 'Doctor visit', 'Treatment', 'Hospital stay', 'Medication', 'Lifestyle Change' and 'Feelings')", | ||
}, | ||
}, | ||
}, | ||
"required": ["output"], | ||
}, | ||
}, | ||
}, | ||
{ | ||
"type": "function", | ||
"function": { | ||
"name": "add_location", | ||
"description": "this function extracts the location", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"output": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"description": "a location (one of 'Home', 'Hospital', 'Doctors' and 'Other')", | ||
}, | ||
}, | ||
}, | ||
"required": ["output"], | ||
}, | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.