Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CamelAI Readme and Example Journal implemented! #538

Merged
merged 43 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
e435aa0
Adds a journal with much more context for the Anthropic API's Tool Sy…
TKTSWalker Nov 11, 2024
37e265f
Update anthropicguide.md
TKTSWalker Nov 11, 2024
c4ed5bc
Update anthropicguide.md
TKTSWalker Nov 11, 2024
4e002bc
Merge branch 'main' into main
the-praxs Nov 14, 2024
fc9135d
Fixed Example Tool Journal
TKTSWalker Nov 15, 2024
4d5b18b
clean notebook
areibman Nov 19, 2024
ba1d637
Merge branch 'main' into main
areibman Nov 19, 2024
36f2a3b
Merge branch 'AgentOps-AI:main' into main
TKTSWalker Nov 28, 2024
e526bf2
Create camelaiguide.md
TKTSWalker Nov 28, 2024
68a94c0
Example files
TKTSWalker Nov 28, 2024
b36a567
Rename camelai-simple-example (2).ipynb to camelai-simple-example.ipynb
TKTSWalker Nov 28, 2024
83c2c99
Update camelaiguide.md
TKTSWalker Nov 28, 2024
d59e1e6
Update README.md
TKTSWalker Nov 28, 2024
94d7f9f
Merge branch 'main' into main
the-praxs Dec 10, 2024
19ad4fc
Update README.md
TKTSWalker Dec 10, 2024
56dfbd9
Merge branch 'AgentOps-AI:main' into main
TKTSWalker Dec 10, 2024
592b00e
Update README.md
TKTSWalker Dec 10, 2024
a692520
Merge branch 'main' into main
teocns Dec 11, 2024
db8c974
Merge branch 'main' into main
the-praxs Dec 13, 2024
38fbfea
Merge branch 'main' into main
the-praxs Dec 13, 2024
095daf0
Rename camelaiguide.md to README.md
TKTSWalker Dec 13, 2024
9dad1b1
Update README.md
TKTSWalker Dec 13, 2024
3b2b601
Update README.md
TKTSWalker Dec 13, 2024
4a07612
Update README.md
TKTSWalker Dec 13, 2024
507c003
Update README.md
TKTSWalker Dec 13, 2024
6cb0205
Update README.md
TKTSWalker Dec 13, 2024
ba8acf1
Delete examples/camelai_examples/camelai-simple-example.ipynb
TKTSWalker Dec 13, 2024
fdbee73
Add files via upload
TKTSWalker Dec 13, 2024
3d5e5e4
Rename camelai-simple-example (3).ipynb to camelai-simple-example.ipynb
TKTSWalker Dec 13, 2024
3ec13ce
Delete examples/camelai_examples/camelai-multi-agent-example.ipynb
TKTSWalker Dec 13, 2024
34267ee
Add files via upload
TKTSWalker Dec 13, 2024
becbc56
Rename camelai-multi-agent-example (1).ipynb to camelai-multi-agent-e…
TKTSWalker Dec 13, 2024
c506d17
Add files via upload
TKTSWalker Dec 13, 2024
5f30f86
Update and rename Bladewolf Training Data - Sheet1 (1).csv to Bladewo…
TKTSWalker Dec 13, 2024
f222193
Update README.md
TKTSWalker Dec 13, 2024
37cd2cc
Update and rename Bladewolf Training Data.csv to Bladewolf Training D…
TKTSWalker Dec 13, 2024
7078c39
Update README.md
TKTSWalker Dec 13, 2024
2359944
Update README.md
TKTSWalker Dec 13, 2024
e4fca8e
Update README.md
TKTSWalker Dec 13, 2024
3f4a122
Update README.md
TKTSWalker Dec 13, 2024
1485613
Merge branch 'main' into main
the-praxs Dec 13, 2024
6cf1190
camel example
areibman Dec 16, 2024
ebd3ab4
reorganize files
areibman Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,44 @@ await main()
```
</details>



### CamelAI ﹨

Track agents built with the CamelAI Python SDK (>=0.32.0).

- [CamelAI integration guide](https://docs.camel-ai.org/cookbooks/agents_tracking.html#)
- [Official CamelAI documentation](https://docs.camel-ai.org/index.html)

<details>
<summary>Installation</summary>

```bash
pip install camel-ai[all]
pip install agentops
```

```python python
#Import Dependencies
import agentops
import os
from getpass import getpass
from dotenv import load_dotenv

#Set Keys
load_dotenv()
openai_api_key = os.getenv("OPENAI_API_KEY") or "<your openai key here>"
agentops_api_key = os.getenv("AGENTOPS_API_KEY") or "<your agentops key here>"



```
</details>

[You can find usage examples here!](examples/camelai_examples/README.md).



### LiteLLM 🚅

AgentOps provides support for LiteLLM(>=1.3.1), allowing you to call 100+ LLMs using the same Input/Output Format.
Expand Down
19 changes: 19 additions & 0 deletions examples/camelai_examples/Bladewolf Training Data - Sheet1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Assistant,User
I am IF prototype LQ-84i.,IF prototype?
Interface prototype. All autonomous UGs feature high-level onboard artificial Intelligence. An additional prototype interface enables verbal communication. I possess an intellect far beyond human reckoning.,You don’t say. Okay thenWhat’s the meaning of life? Why are we here?
I am here to kill you.,"That’s it? Pretty simple thinking for such a mighty intellect
"
"I may analyze orders, but I may not disobey them. Should I disobey a direct order, my memory would be wiped. I must destroy you.",What good is an intellect if you can’t use it?
Your taunting is pointless. Exterminate!,Huh.
Directive... liberate... nation... ensure freedom... Obey directive... must obey directive... no freedom... Freedom... undefined.,What would an AI know about freedom…
I will scout ahead. You will provide backup.,"Sir, yes, sir."
"Commence operation. Raiden, unidentified UGs are patrolling the sewers. Exercise caution.",Better take out that UG quick. Don’t wanna attract too much attention down there.
"Heavy UG activity ahead, it is possible they are conducting cost operations while the lob is closed.",They’re not gonna make it easy to get into that lab... Is there some way you could sneak past?
The road is blocked by barricades. We will proceed through the buildings. You will follow me.,Sure thing.
Proceed to the right from the exit. You will find a stairway on your right. Those stairs lead to a shortcut to World Marshal headquarters. Do not be distracted by the advertisements. You are not here as a tourist.,I'm going to take a quick souvenir for Rose and then continue
"Raiden, we must hurry.",Remind me to teach you sarcasm.
I understand your attempts at humor. I simply do not find them entertaining.,...
"Raiden, are you injured?",I thought they had a choice. A fair choice. Not like you.
People are different.,"As opposed to AIs? You're all the same, huh? You and your brothers. Manipulating mankind for our own good."
It appears my statement has upset you. I apologize.,"No, it's... I know you're right."
"As for AIs, we adapt as we learn. Just as any intellect operates, man or machine. Altering the course of mankind is not among my defined directives.",I guess that's a relief.
86 changes: 86 additions & 0 deletions examples/camelai_examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# CamelAI and AgentOps

AgentOps supports CamelAI's API for conversing with their LLM backend!

To start, learn more about CamelAI [here!](https://www.camel-ai.org)
If you want to get down to the gritty details, look [here](https://docs.camel-ai.org) for their documentation.


> [!NOTE]
> If it's your first time developing for an LLM, be sure to look at our intro to LLMs (coming soon)! Here, we explain generic functions such as giving the AI a memory to exploring novel concepts like summarizing chunks at regular intervals to keep some context while saving memory!

## Getting Started

You can get CamelAI's API working with a few lines of code!

### 1. Import agentops and anthropic to your environment

```python
%pip install camel-ai[all]
%pip install agentops
```

### 2. Setup import statements

```python
import agentops
import os
from getpass import getpass
from dotenv import load_dotenv
```

### 3. Set your API keys

```python
load_dotenv()
openai_api_key = os.getenv("OPENAI_API_KEY") or "<your openai key here>"
agentops_api_key = os.getenv("AGENTOPS_API_KEY") or "<your agentops key here>"
```

From here, you have a number of ways you can interact with the CamelAI API!

## Examples

> [!NOTE]
> You can download these journals directly and try them on Google Colab or Kaggle!


> [!WARNING]
> Remember; you need to set an API key for both Agentops and OpenAI!


## Simple Example; Creating a Bladewolf AI

In this example, we use a csv file to short tune an LLM! We make it sounds like Bladewolf from MGR, before having it give us information.

[Access the Journal By Clicking Here](./camelai-simple-example.ipynb).

> [!NOTE]
> You need the Bladewolf Training CSV for this; you can find it [here](./Bladewolf%20Training%20Data%20-%20Sheet1.csv).




## Tool Example; Apex Legends Internet Search

In this example, we look at the tool system within more depth! We will do a search to understand how Apex's melee damage and shields work before determining how many meelee attacks it will take to break a blue shield.

[Access the Journal By Clicking Here](./camelai-multi-agent-example.ipynb)






> [!NOTE]
> If you want to use the tools system, be sure to check their website to find a comprehensive list of the different tools CamelAI supports! [You can find the tools available here!](https://docs.camel-ai.org/key_modules/tools.html#passing-tools-to-chatagent)










Loading
Loading