-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
192ad1c
commit 0cd51d0
Showing
11 changed files
with
882 additions
and
212 deletions.
There are no files selected for viewing
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
Empty file.
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
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,8 @@ | ||
from pydantic import BaseModel | ||
|
||
from libertai_agents.models.base import ModelId | ||
|
||
|
||
class ModelInformation(BaseModel): | ||
id: ModelId | ||
context_length: int |
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
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
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
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
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,18 +1,9 @@ | ||
import asyncio | ||
|
||
from libertai_agents.agents import ChatAgent | ||
from libertai_agents.interfaces import Message, MessageRoleEnum | ||
from libertai_agents.models import get_model | ||
from libertai_agents.tools import get_current_temperature | ||
|
||
agent = ChatAgent(model=get_model("NousResearch/Hermes-2-Pro-Llama-3-8B"), | ||
system_prompt="You are a helpful assistant", | ||
tools=[get_current_temperature]) | ||
|
||
async def start(): | ||
agent = ChatAgent(model=get_model("NousResearch/Hermes-2-Pro-Llama-3-8B"), | ||
system_prompt="You are a helpful assistant", | ||
tools=[get_current_temperature]) | ||
response = await agent.generate_answer( | ||
[Message(role=MessageRoleEnum.user, content="What's the temperature in Paris and in Lyon in Celsius ?")]) | ||
print(response) | ||
|
||
|
||
asyncio.run(start()) | ||
app = agent.app |
Oops, something went wrong.