From d17a92eef32c0313ea5436c912ab3e893fe56379 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Sat, 21 Oct 2023 11:38:23 +0200 Subject: [PATCH] example(bruno): add image generation Signed-off-by: Ettore Di Giacinto --- .../image generation/Generate image.bru | 25 +++++++++++++++++++ .../chat completion -simple- 1 message-.bru | 16 ++++++++---- 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 examples/bruno/LocalAI Test Requests/image generation/Generate image.bru diff --git a/examples/bruno/LocalAI Test Requests/image generation/Generate image.bru b/examples/bruno/LocalAI Test Requests/image generation/Generate image.bru new file mode 100644 index 00000000..37d350ca --- /dev/null +++ b/examples/bruno/LocalAI Test Requests/image generation/Generate image.bru @@ -0,0 +1,25 @@ +meta { + name: Generate image + type: http + seq: 1 +} + +post { + url: {{PROTOCOL}}{{HOST}}:{{PORT}}/v1/images/generations + body: json + auth: none +} + +headers { + Content-Type: application/json +} + +body:json { + { + "prompt": "|", + "model": "model-name", + "step": 51, + "size": "1024x1024", + "image": "" + } +} diff --git a/examples/bruno/LocalAI Test Requests/llm text/chat/chat completion -simple- 1 message-.bru b/examples/bruno/LocalAI Test Requests/llm text/chat/chat completion -simple- 1 message-.bru index cf51bb7c..fd08aeee 100644 --- a/examples/bruno/LocalAI Test Requests/llm text/chat/chat completion -simple- 1 message-.bru +++ b/examples/bruno/LocalAI Test Requests/llm text/chat/chat completion -simple- 1 message-.bru @@ -15,10 +15,16 @@ headers { } body:json { - { - "model": "{{DEFAULT_MODEL}}", - "messages": [{"role": "user", "content": "How could one use friction to cook an egg?"}], - "max_tokens": 256, - "temperature": 0.2 + { + "model": "{{DEFAULT_MODEL}}", + "messages": [ + { + "role": "user", + "content": "How could one use friction to cook an egg?" + } + ], + "max_tokens": 256, + "temperature": 0.2, + "grammar": "" } }