-
Notifications
You must be signed in to change notification settings - Fork 264
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
Showing
5 changed files
with
110 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,9 +36,6 @@ | |
<a href="https://discord.gg/mKW3ZhN9p2"> | ||
<img src="https://img.shields.io/badge/chat-on%20Discord-blueviolet" alt="Discord community channel"/> | ||
</a> | ||
<a href="mailto:[email protected]"> | ||
<img src="https://img.shields.io/website?color=%23f26522&down_message=Y%20Combinator&label=Not%20Backed%20By&logo=ycombinator&style=flat-square&up_message=Y%20Combinator&url=https%3A%2F%2Fwww.ycombinator.com"/> | ||
</a> | ||
<a href="https://github.com/agentops-ai/agentops/issues"> | ||
<img src="https://img.shields.io/github/commit-activity/m/agentops-ai/agentops" alt="git commit activity"/> | ||
</a> | ||
|
@@ -122,6 +119,9 @@ pip install git+https://github.com/AgentOps-AI/crewAI.git@main | |
|
||
AgentOps works seamlessly with applications built using Langchain. To use the handler, install Langchain as an optional dependency: | ||
|
||
<details> | ||
<summary>Installation</summary> | ||
|
||
```shell | ||
pip install agentops[langchain] | ||
``` | ||
|
@@ -151,13 +151,18 @@ agent = initialize_agent(tools, | |
|
||
Check out the [Langchain Examples Notebook](./examples/langchain_examples.ipynb) for more details including Async handlers. | ||
|
||
### Cohere | ||
</details> | ||
|
||
### Cohere ⌨️ | ||
|
||
First class support for Cohere(>=5.4.0). This is a living integration, should you need any added functionality please message us on Discord! | ||
|
||
- [AgentOps integration example](https://docs.agentops.ai/v1/integrations/cohere) | ||
- [Official Cohere documentation](https://docs.cohere.com/reference/about) | ||
|
||
<details> | ||
<summary>Installation</summary> | ||
|
||
```bash | ||
pip install cohere | ||
``` | ||
|
@@ -198,6 +203,8 @@ for event in stream: | |
|
||
agentops.end_session('Success') | ||
``` | ||
</details> | ||
|
||
|
||
### LlamaIndex 🦙 | ||
|
||
|
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 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import cohere | ||
import agentops # just | ||
from dotenv import load_dotenv | ||
load_dotenv() | ||
|
||
agentops.init(tags=["cohere", "agentops-demo"]) # three | ||
co = cohere.Client() | ||
|
||
stream = co.chat_stream( | ||
message="Tell me everything you can about AgentOps", | ||
connectors=[{"id": "web-search"}] | ||
) | ||
|
||
response = "" | ||
for event in stream: | ||
if event.event_type == "text-generation": | ||
response += event.text | ||
print(event.text, end='') | ||
elif event.event_type == "stream-end": | ||
print("\n") | ||
print(event) | ||
print("\n") | ||
|
||
stream = co.chat_stream( | ||
chat_history=[ | ||
{"role": "SYSTEM", "message": "You are Adam Silverman: die-hard advocate of AgentOps, leader in AI Agent observability"}, | ||
{ | ||
"role": "CHATBOT", | ||
"message": "How's your day going? I'd like to tell you about AgentOps: {response}", | ||
}, | ||
], | ||
message="Based on your newfound knowledge of AgentOps, is Cohere a suitable partner for them and how could they integrate?", | ||
connectors=[{"id": "web-search"}] | ||
) | ||
|
||
response = "" | ||
for event in stream: | ||
if event.event_type == "text-generation": | ||
response += event.text | ||
print(event.text, end='') | ||
elif event.event_type == "stream-end": | ||
print("\n") | ||
print(event) | ||
print("\n") | ||
|
||
agentops.end_session('Success') # lines |