You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I recently discovered how easy it is to use TinyTroupe with Ollama and wanted to share it with you all:
importosfromtinytroupe.factoryimportTinyPersonFactoryos.environ["OPENAI_API_KEY"] ="ollama"os.environ["OPENAI_BASE_URL"] ="http://localhost:11434/v1"bank_spec="A large brazillian bank. It has a lot of branches and a large number of employees. It is facing a lot of competition from fintechs."banker_spec="A vice-president of one of the largest brazillian banks. Has a degree in engineering and an MBA in finance."banker_factory=TinyPersonFactory(bank_spec)
banker=banker_factory.generate_person(banker_spec, attepmpts=1)
print(banker)
bio=banker.minibio()
print(bio)
You might see an error like this:
TypeError: Cannot merge different types: <class 'list'> and <class 'dict'> for key 'relationships'
TypeError: 'NoneType' object is not subscriptable
^^^ Highlighting self._persona['occupation']['title']
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi! I recently discovered how easy it is to use TinyTroupe with Ollama and wanted to share it with you all:
You might see an error like this:
And this message in your
ollama serve
console:This means your context window size is 2048, and you need to increase it.
To do this, create a file named
Modelfile
(or any name you prefer) with the following content:Then run the following command (adjust the last argument to match your model):
(Reference)
Beta Was this translation helpful? Give feedback.
All reactions