mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-26 02:20:11 +00:00
1.8 KiB
1.8 KiB
In [4]:
from langchain import OpenAI, LLMMathChain
llm = OpenAI(temperature=0)
llm_math = LLMMathChain.from_llm(llm, verbose=True)
llm_math.run("What is 13 raised to the .3432 power?")Out [4]:
[1m> Entering new LLMMathChain chain...[0m What is 13 raised to the .3432 power?[32;1m[1;3m ```text 13 ** .3432 ``` ...numexpr.evaluate("13 ** .3432")... [0m Answer: [33;1m[1;3m2.4116004626599237[0m [1m> Finished chain.[0m
'Answer: 2.4116004626599237'
In [ ]: