-
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.
Merge pull request #3 from gritaro/rc-0.1.3
Add support for completion models configuration
- Loading branch information
Showing
5 changed files
with
91 additions
and
50 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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from langchain.schema import HumanMessage, SystemMessage | ||
from langchain_community.chat_models import ChatAnyscale | ||
|
||
chat = ChatAnyscale(model="eta-llama/Llama-2-70b-chat-hf", anyscale_api_key="<key>") | ||
|
||
messages = [ | ||
SystemMessage( | ||
content="You are a helpful AI that shares everything you know." | ||
) | ||
] | ||
|
||
while(True): | ||
user_input = input("User: ") | ||
messages.append(HumanMessage(content=user_input)) | ||
res = chat(messages) | ||
messages.append(res) | ||
print("Bot: ", res.content) |