feat: Adding OpenAI Compatible Prompts API

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-09-03 14:14:54 -04:00
parent 30117dea22
commit 8b00883abd
181 changed files with 21356 additions and 10332 deletions

View file

@ -15,23 +15,23 @@
"body": {
"__type__": "openai.types.completion.Completion",
"__data__": {
"id": "cmpl-43",
"id": "cmpl-775",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"text": "Blue.\n\nMy response is based on the traditional English rhyme that pairs the colors of roses (red) with violets in a poetic and somewhat whimsical way. This specific version of the rhyme goes like this:\n\n\"Roses are red,\nViolets are blue,\nSugar is sweet,\nAnd so are you.\"\n\nIn modern times, variations of this rhyme can deviate from the original \"blue\" for violets, but in my complete sentence as requested, sticking with a widely recognized completion adds an air of timelessness and familiarity to the phrase."
"text": "Blue.\n\nMy response is based on the traditional rhyme \"Roses are Red, Violets are Blue,\" which is a well-known poem or phrase often used as a greeting or way to express affection. The exact wording may vary slightly depending on the source, but the general meaning remains the same: violets are typically depicted as blue-colored flowers in this rhyme."
}
],
"created": 1754348148,
"created": 1756921025,
"model": "llama3.2:3b-instruct-fp16",
"object": "text_completion",
"system_fingerprint": "fp_ollama",
"usage": {
"completion_tokens": 113,
"completion_tokens": 75,
"prompt_tokens": 50,
"total_tokens": 163,
"total_tokens": 125,
"completion_tokens_details": null,
"prompt_tokens_details": null
}