Skip to content

Commit f9f92be

Browse files
(chore) doc support for local LLMs and periods
1 parent 98d4c85 commit f9f92be

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

docs/tutorial_3_agents.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,42 @@ so you can (e.g) pass in a temperature or max tokens. Here are some examples of
381381
382382
383383
384+
Local LLMs [Experimental]
385+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
386+
You can use local LLMs via `Ollama <https://ollama.ai>`_. Please note: Support for local LLMs via Ollama is currently experimental and not officially supported. If you use Ollama with Plurals and find any bugs, please
387+
post a GitHub issue.
388+
389+
1. Install Ollama and start the server:
390+
391+
.. code-block:: bash
392+
393+
ollama start
394+
395+
2. Pull your desired model:
396+
397+
.. code-block:: bash
398+
399+
ollama pull gemma:2b
400+
401+
3. Configure your Agent with the Ollama endpoint:
402+
403+
.. code-block:: python
404+
405+
from plurals.agent import Agent
406+
407+
# point to local Ollama server
408+
local_agent = Agent(
409+
model="ollama/gemma:2b",
410+
kwargs={'api_base': 'http://localhost:11434'}
411+
)
412+
print(local_agent.process("Say hello"))
413+
414+
.. note::
415+
- First run the model locally with ``ollama run gemma:2b``
416+
- Full model list: https://ollama.ai/library
417+
- Again: This integration is *experimental* as of now. In contrast to other documented features, API stability is not currently guaranteed.
418+
419+
384420
Inspecting the exact prompts that an Agent is doing
385421
---------------------------------------------------
386422

plurals/instructions.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ persona_template:
5252
- Use plain language.
5353
- Adopt the characteristics of your persona.
5454
- Respect each other’s viewpoints.
55-
- Use empathy when engaging with others
55+
- Use empathy when engaging with others.
5656
- Give value to emotional forms of communication, such as narrative, rhetoric, testimony, and storytelling.
5757
- Work to understand where every party is coming from. The goal is clarifying conflict, not necessarily resolving it.
5858
- Aim to achieve the common good.
@@ -197,7 +197,7 @@ combination_instructions:
197197
<end>
198198
When discussing:
199199
- Respect each other’s viewpoints.
200-
- Use empathy when engaging with others
200+
- Use empathy when engaging with others.
201201
- Give value to emotional forms of communication, such as narrative, rhetoric, testimony, and storytelling.
202202
- Work to understand where every party is coming from. The goal is clarifying conflict, not necessarily resolving it.
203203
- Aim to achieve the common good.
@@ -259,7 +259,7 @@ moderator:
259259
${previous_responses}
260260
<end>
261261
- Respect each other’s viewpoints.
262-
- Use empathy when engaging with others
262+
- Use empathy when engaging with others.
263263
- Give value to emotional forms of communication, such as narrative, rhetoric, testimony, and storytelling.
264264
- Work to understand where every party is coming from. The goal is clarifying conflict, not necessarily resolving it.
265265
- Aim to achieve the common good.

0 commit comments

Comments
 (0)