People should be able to use different distance metrics for the DynamicFewShotGPTClassifier. According to this SO answer we should use the same similarity metric that of the model. E.g. cosine for openai.
I simply propagated the metric variable up to DynamicFewShotGPTClassifier and tested it with the example from the documentation.
I added a change for #90 in the second commit. From what I can tell the predict function is handled by the BaseClassifier mixin and we can simply cast to np.array.
People should be able to use different distance metrics for the
DynamicFewShotGPTClassifier
. According to this SO answer we should use the same similarity metric that of the model. E.g. cosine for openai. I simply propagated themetric
variable up toDynamicFewShotGPTClassifier
and tested it with the example from the documentation.