-
-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor reasoning capabilities and update version to 0.0.52
- Removed the `any-llm-think.py` script to streamline the agent framework. - Enhanced `deepseek-reasoning-agents.py` to include reasoning display options and updated the method for starting agents. - Updated `pyproject.toml` and `uv.lock` to reflect the new version 0.0.52. - Improved `agent.py` and `llm.py` to support reasoning content in both synchronous and asynchronous calls, enhancing the overall functionality of the agent framework. These changes aim to refine the reasoning features and improve the user experience within the PraisonAI framework.
- Loading branch information
1 parent
1bbab8d
commit 728bde4
Showing
9 changed files
with
363 additions
and
140 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from praisonaiagents import Agent | ||
|
||
agent = Agent(instructions="You are helpful Assisant", llm="deepseek-reasoner") | ||
agent = Agent(instructions="You are helpful Assisant", llm="deepseek-reasoner", show_reasoning=True) | ||
|
||
agent.start("Why sky is Blue?", show_reasoning=True) | ||
result = agent.start("Why sky is Blue?") | ||
print(result) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from litellm import completion | ||
|
||
messages = [{"role": "user", "content": "What is 1+1?"}] | ||
resp = completion( | ||
model="deepseek/deepseek-reasoner", | ||
messages=messages, | ||
stream=False | ||
) | ||
|
||
reasoning_content = resp.choices[0].message.provider_specific_fields["reasoning_content"] | ||
content = resp.choices[0].message.content | ||
|
||
print(reasoning_content) | ||
print(content) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from praisonaiagents import Agent | ||
|
||
agent = Agent( | ||
instructions="You are helpful Assisant", | ||
llm="deepseek/deepseek-reasoner" | ||
) | ||
|
||
result = agent.start("Why sky is Blue?") | ||
print(result) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from praisonaiagents import Agent | ||
|
||
agent = Agent( | ||
instructions="You are helpful Assisant", | ||
llm="deepseek/deepseek-reasoner", | ||
show_reasoning=True | ||
) | ||
|
||
result = agent.start("Why sky is Blue?") | ||
print(result) |
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.