This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ollama | |
| import csv | |
| PROMPT = """ | |
| Read the following text and rephrase it in a more contemporary and casual manner: | |
| The different accidents of life are not so changeable as the feelings | |
| of human nature. I had worked hard for nearly two years, for the sole | |
| purpose of infusing life into an inanimate body. For this I had | |
| deprived myself of rest and health. I had desired it with an ardour |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import chromadb | |
| import dspy | |
| # Chose your LM. I'm using Qwen3-4B, hosted by LM Studio | |
| lm = dspy.LM( | |
| 'openai/qwen_qwen3-4b-thinking-2507', | |
| api_base="http://127.0.0.1:1234/v1", | |
| api_key="blah", | |
| max_tokens=262144 | |
| ) |
OlderNewer