Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
e895fd9
add content_id, db_path and user_path
echo-yiyiyi Mar 5, 2025
43209a0
change action space
echo-yiyiyi Mar 5, 2025
08968fb
change action spac
echo-yiyiyi Mar 5, 2025
3973436
update the version of camel-ai
echo-yiyiyi Mar 5, 2025
af6fd05
update camel-ai version
echo-yiyiyi Mar 5, 2025
a54b765
add retry
echo-yiyiyi Mar 6, 2025
0ad7d0a
let agent output emoji
echo-yiyiyi Mar 6, 2025
edb3a16
update prompt
echo-yiyiyi Mar 6, 2025
781f8e5
successful debug
echo-yiyiyi Mar 7, 2025
00fb9e4
mean prob, loong prob
echo-yiyiyi Mar 7, 2025
52b90fc
random choose profile
echo-yiyiyi Mar 7, 2025
9e912dc
提交
luoyou Mar 7, 2025
41ed1f2
Merge branch 'product' of github.com:camel-ai/oasis into product
luoyou Mar 7, 2025
70101ad
Modify code to adapt to productization
luoyou Mar 8, 2025
226972f
debug agent sign up error
luoyou Mar 8, 2025
81b1bfb
add redis subscribe
Mar 10, 2025
c3ab9d9
add redis subscribe
Mar 10, 2025
068496c
add redis subscribe
Mar 10, 2025
d338cca
update do_nothing
echo-yiyiyi Mar 10, 2025
d024771
调整代码
Mar 11, 2025
19bad3e
Merge branch 'product' of github.com:camel-ai/oasis into product
Mar 11, 2025
a586551
use redis start service
Mar 11, 2025
ae04e53
use redis start service
Mar 11, 2025
72677d9
改进代码
Mar 11, 2025
2de9892
debug
Mar 11, 2025
4c53e35
debug
Mar 11, 2025
ba65de5
add pypi version
Mar 11, 2025
5536e9d
add dockerfile to run
luoyou Mar 11, 2025
89cc0ae
add dockerfile to run
luoyou Mar 11, 2025
97cfa39
add dockerfile to run
luoyou Mar 11, 2025
5122fb2
Merge branch 'product' of github.com:camel-ai/oasis into product
luoyou Mar 11, 2025
5b7f1e9
debug redis
luoyou Mar 11, 2025
d4788fe
support no content predict
Mar 12, 2025
5fe928a
remove debug infomation
luoyou Mar 12, 2025
3a10c11
remove debug content
Mar 13, 2025
6e0b6ac
remove hastag
echo-yiyiyi Mar 14, 2025
85335f2
remove hashtag
echo-yiyiyi Mar 17, 2025
3de3b6f
chinese support
echo-yiyiyi Mar 18, 2025
bee7cf6
support chinese
echo-yiyiyi Mar 19, 2025
b93769e
different activate prob
echo-yiyiyi Mar 19, 2025
888d6e9
finish test
echo-yiyiyi Mar 19, 2025
2860def
merge remote
echo-yiyiyi Mar 19, 2025
1993001
Product algorithm adjust (#50)
echo-yiyiyi Mar 19, 2025
3df72c0
remove debug message, make project run suceess
Mar 20, 2025
c2ada8c
recover code
Mar 20, 2025
f7834a5
fix first predict sqlite query bug
Mar 20, 2025
8e0879c
add test debug
Mar 21, 2025
8bb0227
fix predict content lost problem
Mar 21, 2025
42e0cea
merge newest main
echo-yiyiyi Mar 25, 2025
0d44a22
add test info
Mar 25, 2025
5a261df
merge newest product
echo-yiyiyi Mar 25, 2025
e406631
use_openai_embedding=True
echo-yiyiyi Mar 25, 2025
6ea4e94
change to openai embedding model
echo-yiyiyi Mar 25, 2025
6a2a262
remove proxy
echo-yiyiyi Mar 25, 2025
28aecba
contente limit str
Mar 26, 2025
b51cca4
新增json内容进行包装
Mar 27, 2025
c88705c
run but slow
echo-yiyiyi Mar 27, 2025
9562c30
success run reddit
echo-yiyiyi Mar 27, 2025
0db25a6
successfully run gpt example and clean the output
echo-yiyiyi Mar 27, 2025
0bb833d
Add print env
echo-yiyiyi Mar 27, 2025
afb0dd1
change prompt
Mar 28, 2025
50c58ac
Merge branch 'product' of https://github.com/camel-ai/oasis into product
Mar 28, 2025
109cdb4
remove oasis-venv
Pakchoioioi Mar 28, 2025
0fbcf57
agent follow info enhance
echo-yiyiyi Mar 29, 2025
581f2ec
fix reddit_gpt_example
echo-yiyiyi Mar 29, 2025
b615007
change prompt
Pakchoioioi Mar 30, 2025
4cdcf16
auto model
echo-yiyiyi Apr 1, 2025
b964e44
add hot prob
echo-yiyiyi Apr 1, 2025
3641ec4
remove proxy
echo-yiyiyi Apr 1, 2025
62cf845
update command
luoyou Apr 1, 2025
ce2a43b
Merge branch 'product' of github.com:camel-ai/oasis into product
luoyou Apr 1, 2025
33bc1eb
update command
luoyou Apr 1, 2025
4508f52
use rule-based method instead of llm to check language
Wendong-Fan Apr 1, 2025
5812195
use rule-based method instead of llm to check language (#64)
echo-yiyiyi Apr 2, 2025
fd4dd0e
update round num
echo-yiyiyi Apr 2, 2025
5977233
remove proxy
echo-yiyiyi Apr 2, 2025
4bf3e4b
add flag for sad
echo-yiyiyi Apr 3, 2025
746fc24
move sad position
echo-yiyiyi Apr 3, 2025
868f38f
add trigger sad flag
Apr 3, 2025
8dcaded
twitter gpt run success
echo-yiyiyi Apr 3, 2025
2fbbb2a
remove chinese investment
echo-yiyiyi Apr 4, 2025
1898063
Merge branch 'product' of https://github.com/camel-ai/oasis into product
echo-yiyiyi Apr 4, 2025
0c957f9
update openai embedding
echo-yiyiyi Apr 4, 2025
9bb9068
fix opensource scripts
echo-yiyiyi Apr 4, 2025
d6632ac
add transformers version
echo-yiyiyi Apr 6, 2025
b03eb82
remove load twhin-bert
echo-yiyiyi Apr 6, 2025
a186a36
save
echo-yiyiyi Apr 1, 2025
ab014c1
save
echo-yiyiyi Apr 2, 2025
4a41532
counterfactual success
echo-yiyiyi Apr 8, 2025
8b446c3
success twitter_simulation
echo-yiyiyi Apr 8, 2025
7f0d492
repair all scripts
echo-yiyiyi Apr 8, 2025
08d71cb
add twitter clock
echo-yiyiyi Apr 10, 2025
455c1b9
update clock in scripts
echo-yiyiyi Apr 10, 2025
61a7625
fix perform_test
zhangzaibin Apr 10, 2025
4ea129a
finish env
echo-yiyiyi Apr 10, 2025
b792475
success run reddit
echo-yiyiyi Apr 10, 2025
317466c
add semaphore and hint
echo-yiyiyi Apr 10, 2025
d76ca94
add twitter env scripts
echo-yiyiyi Apr 10, 2025
3453034
success custom env
echo-yiyiyi Apr 10, 2025
99f1a20
camel-ai to 0.2.43
echo-yiyiyi Apr 10, 2025
18f941f
Update oasis/social_agent/agent.py
echo-yiyiyi Apr 16, 2025
ff2f8cd
fix perform_test (#71)
echo-yiyiyi Apr 16, 2025
0cea500
Merge branch 'main' into refactor
echo-yiyiyi Apr 16, 2025
6bd0d6c
fix pre-commit
echo-yiyiyi Apr 16, 2025
598e332
Merge branch 'refactor' of https://github.com/camel-ai/oasis into ref…
echo-yiyiyi Apr 16, 2025
884acdd
fix pre-commit
echo-yiyiyi Apr 16, 2025
bb35cd8
add requests_oauthlib
echo-yiyiyi Apr 16, 2025
fffcfa5
fix test
echo-yiyiyi Apr 16, 2025
40a8950
clean mbti for twitter
zhangzaibin Apr 17, 2025
bae1139
clean description and activate level
zhangzaibin Apr 17, 2025
375deb9
fix pytest
echo-yiyiyi Apr 17, 2025
9e29130
clean agent generator
zhangzaibin Apr 17, 2025
bb12dd6
clean example data and recsys
zhangzaibin Apr 17, 2025
efa01cd
clean example data and recsys
zhangzaibin Apr 17, 2025
ed116cb
clean example data and recsys
zhangzaibin Apr 17, 2025
ba84900
fix typo
zhangzaibin Apr 17, 2025
4dac747
fix test
zhangzaibin Apr 17, 2025
5eec5a2
remove data readme
zhangzaibin Apr 17, 2025
e573380
clean data and recsys (#74)
echo-yiyiyi Apr 17, 2025
e1d5f09
init doc
zhangzaibin Apr 19, 2025
81addc9
add environment settings
zhangzaibin Apr 19, 2025
d5401e6
add simulation settings
zhangzaibin Apr 19, 2025
5a83a59
Merge branch 'main' into refactor
echo-yiyiyi Apr 21, 2025
e91113a
update quick start, not refresh the doc link
echo-yiyiyi Apr 21, 2025
49f7979
update scripts
echo-yiyiyi Apr 21, 2025
45db427
refactor doc
zhangzaibin Apr 22, 2025
d7aa0e8
generate log
echo-yiyiyi Apr 22, 2025
67c44e0
reddit user data
zhangzaibin Apr 23, 2025
1a8b488
add platform store recsys
zhangzaibin Apr 23, 2025
c60584d
add overview
zhangzaibin Apr 23, 2025
36ffbe1
add visualization
zhangzaibin Apr 23, 2025
afb7985
polish intro and quick start
zhangzaibin Apr 23, 2025
ef19fb4
Merge branch 'refactor_doc' of https://github.com/camel-ai/oasis into…
echo-yiyiyi Apr 23, 2025
449a5a6
clean the structure, left the platform and final check
echo-yiyiyi Apr 23, 2025
cfafcd7
finish the review of doc
echo-yiyiyi Apr 24, 2025
59f18b6
finish the review of doc
echo-yiyiyi Apr 24, 2025
1296815
Refactor doc (#84)
echo-yiyiyi Apr 24, 2025
ef42c5e
update old tutorials
echo-yiyiyi Apr 24, 2025
07b5cc0
Revert "Refactor doc"
echo-yiyiyi Apr 24, 2025
08144f1
Revert "Refactor doc" (#86)
echo-yiyiyi Apr 24, 2025
8b9f6eb
add docs
echo-yiyiyi Apr 24, 2025
6637f9d
fix pre-commit
echo-yiyiyi Apr 24, 2025
77cc1b4
fix pre-commit
echo-yiyiyi Apr 24, 2025
24edfc3
previous name to readme
echo-yiyiyi Apr 24, 2025
2371137
change the path
echo-yiyiyi Apr 24, 2025
c698b67
change the file path
echo-yiyiyi Apr 24, 2025
b2fca11
version 0.1.1
echo-yiyiyi Apr 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
94 changes: 68 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,55 +106,97 @@ For more showcaes:

## ⚙️ Quick Start

### 1. Clone the Repository
1. **Install the OASIS package:**

Installing OASIS is a breeze thanks to its availability on PyPI. Simply open your terminal and run:

```bash
pip install camel-oasis
```

2. **Set up your OpenAI API key:**

```bash
git clone https://github.com/camel-ai/oasis.git
# For Bash shell (Linux, macOS, Git Bash on Windows):
export OPENAI_API_KEY=<insert your OpenAI API key>

cd oasis
# For Windows Command Prompt:
set OPENAI_API_KEY=<insert your OpenAI API key>
```

### 2. Create and Activate a Virtual Environment
3. **Prepare the agent profile file:**

Please choose one of the following methods to set up your environment. You only need to follow one of these methods.
Create the profile you want to assign to the agent. As an example, you can download [user_data_36.json](https://github.com/camel-ai/oasis/blob/main/data/reddit/user_data_36.json) and place it in your local `./data/reddit` folder.

- Option 1: Using Conda (Linux & macOS & windows)
4. **Run the following Python code:**

```bash
conda create --name oasis python=3.10
conda activate oasis
```
```python
import asyncio
import os

- Option 2: Using venv (Linux & macOS)
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType

```bash
python -m venv oasis-venv
source oasis-venv/bin/activate
```
import oasis
from oasis import ActionType, EnvAction, SingleAction

- Option 3: Using venv (Windows)

```bash
python -m venv oasis-venv
oasis-venv\Scripts\activate
```
async def main():
# Define the model for the agents
openai_model = ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O_MINI,
)

### 3. Install Necessary Packages
# Define the available actions for the agents
available_actions = [
ActionType.LIKE_POST,
ActionType.CREATE_POST,
ActionType.CREATE_COMMENT,
ActionType.FOLLOW
]

```bash
pip install --upgrade pip setuptools
# Make the environment
env = oasis.make(
platform=oasis.DefaultPlatformType.REDDIT,
database_path="reddit_simulation.db",
agent_profile_path="./data/reddit/user_data_36.json",
agent_models=openai_model,
available_actions=available_actions,
)

# Run the environment
await env.reset()

action = SingleAction(
agent_id=0,
action=ActionType.CREATE_POST,
args={"content": "Welcome to the OASIS World!"}
)

env_actions = EnvAction(
activate_agents=list(range(10)), # activate the first 10 agents
intervention=[action]
)

# Apply interventions to the environment, refresh the recommendation system, and LLM agent perform actions
await env.step(env_actions)

# Close the environment
await env.close()

pip install -e . # This will install dependencies as specified in pyproject.toml
if __name__ == "__main__":
asyncio.run(main())
```

<br>

> \[!TIP\]
> For more detailed instructions and additional configuration options, check out the [installation section](tutorials/installation.md).
> For more detailed instructions and additional configuration options, check out the documentation(coming soon).

### More Tutorials

To discover how to create profiles for large-scale users, as well as how to visualize and analyze social simulation data once your experiment concludes, please refer to [More Tutorials](tutorials/tutorial.md) for detailed guidance.
To discover how to create profiles for large-scale users, as well as how to visualize and analyze social simulation data once your experiment concludes, please refer to [More Tutorials](examples/experiment/user_generation_visualization.md) for detailed guidance.

<div align="center">
<img src="assets/tutorial.png" alt="Tutorial Overview">
Expand Down
230 changes: 115 additions & 115 deletions data/twitter_dataset/anonymous_topic_200_1h/False_Business_0.csv

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Mintlify Starter Kit

Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including

- Guide pages
- Navigation
- Customizations
- API Reference pages
- Use of popular components

### Development

Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command

```
npm i -g mintlify
```

Run the following command at the root of your documentation (where docs.json is)

```
mintlify dev
```

### Publishing Changes

Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.

#### Troubleshooting

- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
- Page loads as a 404 - Make sure you are running in a folder with `docs.json`
4 changes: 4 additions & 0 deletions docs/api-reference/endpoint/create.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Create Plant'
openapi: 'POST /plants'
---
4 changes: 4 additions & 0 deletions docs/api-reference/endpoint/delete.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Delete Plant'
openapi: 'DELETE /plants/{id}'
---
4 changes: 4 additions & 0 deletions docs/api-reference/endpoint/get.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Get Plants'
openapi: 'GET /plants'
---
4 changes: 4 additions & 0 deletions docs/api-reference/endpoint/webhook.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'New Plant'
openapi: 'WEBHOOK /plant/webhook'
---
33 changes: 33 additions & 0 deletions docs/api-reference/introduction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: 'Introduction'
description: 'Example section for showcasing API endpoints'
---

<Note>
If you're not looking to build API reference documentation, you can delete
this section by removing the api-reference folder.
</Note>

## Welcome

There are two ways to build API documentation: [OpenAPI](https://mintlify.com/docs/api-playground/openapi/setup) and [MDX components](https://mintlify.com/docs/api-playground/mdx/configuration). For the starter kit, we are using the following OpenAPI specification.

<Card
title="Plant Store Endpoints"
icon="leaf"
href="https://github.com/mintlify/starter/blob/main/api-reference/openapi.json"
>
View the OpenAPI specification file
</Card>

## Authentication

All API endpoints are authenticated using Bearer tokens and picked up from the specification file.

```json
"security": [
{
"bearerAuth": []
}
]
```
Loading