Skip to content

Commit a868994

Browse files
authored
docs: Unify image styles with BentoML theme (#5338)
Unify doc image styles with BentoML theme Signed-off-by: Sherlock113 <sherlockxu07@gmail.com>
1 parent 67c4df5 commit a868994

File tree

5 files changed

+2
-2
lines changed

5 files changed

+2
-2
lines changed
3.18 KB
Loading
4.79 KB
Loading
-444 KB
Loading
7.04 KB
Loading

docs/source/examples/shieldgemma.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This example is ready for easy deployment and scaling on BentoCloud. With a sing
4646
Architecture
4747
------------
4848

49-
This example includes two BentoML Services: ``Gemma`` and ``ShieldAssistant``. ``Gemma`` evaluates the safety of the prompt, and if it is considered safe, ``ShieldAssistant`` proceeds to call the OpenAI GPT-3.5 Turbo API to generate a response. If the probability score from the safety check exceeds a preset threshold, it indicates a potential violation of the safety guidelines. As a result, ``ShieldAssistant`` raises an error and rejects the query.
49+
This example includes two BentoML Services: ``Gemma`` and ``ShieldAssistant``. ``Gemma`` evaluates the safety of the prompt, and if it is considered safe, ``ShieldAssistant`` proceeds to call the OpenAI GPT-4o API to generate a response. If the probability score from the safety check exceeds a preset threshold, it indicates a potential violation of the safety guidelines. As a result, ``ShieldAssistant`` raises an error and rejects the query.
5050

5151
.. image:: ../../_static/img/examples/shieldgemma/architecture-shield.png
5252
:alt: Architecture diagram showing the flow between Gemma and ShieldAssistant services, illustrating how prompts are evaluated for safety before being processed
@@ -169,7 +169,7 @@ The ``service.py`` file outlines the logic of the two required BentoML Services.
169169
170170
# Otherwise, generate a response using the OpenAI client
171171
messages = [{"role": "user", "content": prompt}]
172-
response = await self.client.chat.completions.create(model="gpt-3.5-turbo", messages=messages)
172+
response = await self.client.chat.completions.create(model="gpt-4o", messages=messages)
173173
return AssistantResponse(text=response.choices[0].message.content)
174174
175175
Try it out

0 commit comments

Comments
 (0)