Spaces:
Running
Running
stefanches7
commited on
Commit
·
6fc7119
1
Parent(s):
a9d91c7
ollama script
Browse files- smol-data-desc.py +8 -0
smol-data-desc.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import dspy
|
| 2 |
+
|
| 3 |
+
lm = dspy.LM("ollama/alibayram/smollm3", api_base="http://127.0.0.1:11434", api_key="")
|
| 4 |
+
dspy.configure(lm=lm)
|
| 5 |
+
math = dspy.ChainOfThought("question -> answer: float")
|
| 6 |
+
print(math(question="Two dice are tossed. What is the probability that the sum equals two?"))
|
| 7 |
+
|
| 8 |
+
print(lm(messages=[{"role": "user", "content": "Say this is a test!"}])) # => ['This is a test!']
|