Hi @mohamadaliakbari ! It’s only role and content that is accepted. You can define metadata in your system prompt and hope for the best (generally the model will take your metadata into account).
@platypus I read in the chat compleitions documentation that we can add a ‘metadata’ parameter to keep additional information, but got this error “TypeError: got an unexpected keyword argument ‘metadata’”
Ok I figured it out - that metadata parameter is only used when you are storing your chat completions, e.g. for use with evaluation or distillation - so you have to also set store to true, in combination with metadata.
I did a simple call with "metadata": {"foo": "bar"}, and "store": true and this is what it looks like on my dashboard:
In the meantime I will also create a note that the API reference should be updated, i.e. store must be set to true otherwise you will get the following error:
"error": {
"message": "The 'metadata' parameter is only allowed when 'store' is enabled.",
"type": "invalid_request_error",
"param": "metadata",
"code": null
}
OK! Thanks for the clarification. So if I want to add metadata to the request without storing it, it would have to be managed outside the request (e.g., appending the ID to a table that stores the response when invoking a function to make the request). Is that right?