Closed alexewerlof closed 1 year ago
Would be more than willing to accept the first one, the second one would be interesting, but I'd need to see more. I'd open these as two seperate PRs.
I can propose a PR for the second one but it's going to add a bit of code for type checking the JSON. I have created JTY for cases like this, but I don't want to add a dependency just for that. So before spending further time into a PR, I have a few questions:
Closing this as it duplicates #24.
Opened a new issue for the type guard part: #32
Currently only
ChatCompletionMessage
is exported.I need its variations to write guard type guards:
SystemCompletionMessage
UserCompletionMessage
FunctionAwareAssistantCompletionMessage
FunctionCompletionMessage
AssistantCompletionMessage
function_call
and regularcontent
both can haverole: 'assistant
, so one needs to look inside the object)?