https://github.com/aaltorse/collaborativeai
A Repository for the collaborative AI Arena
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.9%) to scientific vocabulary
Repository
A Repository for the collaborative AI Arena
Basic Info
- Host: GitHub
- Owner: AaltoRSE
- License: mit
- Language: Python
- Default Branch: main
- Size: 176 MB
Statistics
- Stars: 0
- Watchers: 7
- Forks: 2
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
Collaborative AI Arena
The collaborative AI arena is intended to serve as a basis for evaluation of collaboration between AI and Humans. The idea is to design and evaluate tasks which are performed with input from both sides, and figure out if the collaboration was successful. Users should be presented with a task that they perform together with the AI and metric should be used to evaluate the different
This repository contains most of the code necessary to add a Model or a Task.
Task Templates:
There are two tasks, poetry and tangram currently available as examples. Poetry has a frontend created in ReactJS and tangram in vueJS using a godot game.
Prompt:
The prompt for the tasks are located at task_template/app/task_examples For poetry, the task is in poetry.py
for the tangram task it is located in tangram.py
Although the current prompts serve as a starting point for the tasks, they are by no means optimized. Because of that, we highly recommend you to experiment and do some prompt engineering for it to fit whatever task you have in mind.
Frontend:
There are two example frontends. One is for a poetry task done in ReactJS, the other is for a tangram game using vueJS and a godot game.
Poetry
The main idea of the task is that the user submits the theme/objective for the poem and then they collaborate with the model to complete it. However, This task is not limited to poem writing only as you can freely switch between a line-by-line rendering (poem) or a continuous rendering (paragraph). For a more detailed explanation, please go here
Tangram
The idea is that the human and the AI work together to build something with a tangram game. At the moment the game provided is restricted to two pieces, so there iis only a limited amount of options. The game can be replaced by whatever the user wants, and just represents one possibility. For a more detailed explanation, please go here
Model selection:
At the moment, the system supports two models o1-mini and gpt4-o, which are located inside the folder model_template/models.
You can change between the two models by changing the value of the variable ai_model between OpenAIImageModel() and OpenAIModel() in the file model_template/model.py.
If you have time and want to add your own models to the system, feel free to do so by following the template located in the file basemodel.py and using the already existing model files as guidance.
Templates
The task_template and model_template folders contain template applications for deployment on the AI Builder infrastructure.
They indicate how to implement a model and a task and supply most infrastructure necessary to minimise the requirements of a user to adopt their code.
Details are provided in the respective README files.
Local testing
To test things locally and see if they work, we provide a docker compose file along with a simple orchestrator.
To run locally you will need docker installed!
In addition to docker, you will need to set three environment variables in a .env file in the source folder (you can use .env_exmaple as a template):
- TASK_DOCKERFILE: This refers to the dockerfile of the Task you want to test.
- There are currently 5 already made tasks that you can try out:
Dockerfile_poetry,Dockerfile_tangram,Dockerfile_gesture.Dockerfile_mealplan. andDockerfile_recipe. - If you're using the 2 React templates to create your own task:
Dockerfile_react_chat_templateorDockerfile_react_templatebased on which template you are using.
- There are currently 5 already made tasks that you can try out:
- MODEL: Refers to the model that is supposed to be used. There are currently 5 "default" models.
- 1. aalto: A model using the Aalto APIs. This model requires you to use an Aalto OpenAI API key and be on the Aalto network
- 2. aalto_image: Similar to aalto but has image processing capabilities
- 3. openai: the GPT4_turbo model (your key needs to be an OpenAI API key)
- 4. openai_image: the GPT4o-vision model with image processing capabilities (your key needs to be an OpenAI API key)
- 5. o1mini: the GPT4o-mini model (your key needs to be an OpenAI API key)
- OPENAIAPIKEY: Your OPENAI (Or Aalto Azure) API key for the model.
- NGINXHTTPSPORT: Default is 443 (normal HTTPS port). If you run docker/podman rootless you will need to change this port to a port above 1000 as ports below 1000 are reserved to system processes (i.e. need root permissions).
You can then run the system by running docker compose up
If code has changed, you will need to run docker compose up --build to update the current code.
The frontend will then be reachable at https://localhost.
If you had to change the NGINX_HTTPS_PORT, the address where the frontend is run changes to https://localhost:NGINX_HTTPS_PORT/ instead of https://localhost
NOTE: When connecting, your system will likely complain, that the certificates provided are not valid. Since this is for local development we provide some self signed certificates in the repo. Most browsers allow continuing by clicking something like "accept the risk". DO NOT REUSE THESE CERTIFICATES/KEYS IF YOU DEPLOY THE SYSTEM OUTSIDE OF LOCAL DEVELOPMENT.
Dependencies
Main dependencies of the infrastructure:
Model Template: | Name | License | Docs | | ---------------- | -------------------- | -------------------------------------------------- | | openai | Apache license 2.0 | link | | grpcio | Apache license 2.0 | link | | grpcio-tools | Apache license 2.0 | link | | protobuf | 3-Clause BSD License | link | | pydantic | MIT | link | | langchain | MIT | link | | langchain-openai | MIT | link |
Model Handler: | Name | License | Docs | | ------------ | -------------------- | ---------------------------------------------- | | grpcio | Apache license 2.0 | link | | grpcio-tools | Apache license 2.0 | link | | protobuf | 3-Clause BSD License | link | | pydantic | MIT | link | | pymongo | Apache License | link | | pytz | MIT | link |
Task Template: | Name | License | Docs | | ---------------- | -------------------- | -------------------------------------------------- | | openai | Apache license 2.0 | link | | grpcio | Apache license 2.0 | link | | grpcio-tools | Apache license 2.0 | link | | protobuf | 3-Clause BSD License | link | | pydantic | MIT | link | | langchain | MIT | link | | langchain-openai | MIT | link | | fastapi | MIT | link | | itsdangerous | BSD | link | | uvicorn | BSD | link |
Owner
- Name: AaltoRSE
- Login: AaltoRSE
- Kind: organization
- Repositories: 38
- Profile: https://github.com/AaltoRSE
GitHub Events
Total
- Issues event: 3
- Issue comment event: 8
- Push event: 109
- Pull request review event: 3
- Pull request review comment event: 1
- Pull request event: 23
- Fork event: 4
- Create event: 11
Last Year
- Issues event: 3
- Issue comment event: 8
- Push event: 109
- Pull request review event: 3
- Pull request review comment event: 1
- Pull request event: 23
- Fork event: 4
- Create event: 11
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 2
- Total pull requests: 7
- Average time to close issues: 7 days
- Average time to close pull requests: 1 day
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 0.5
- Average comments per pull request: 0.0
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 7
- Average time to close issues: 7 days
- Average time to close pull requests: 1 day
- Issue authors: 2
- Pull request authors: 3
- Average comments per issue: 0.5
- Average comments per pull request: 0.0
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jsimell (1)
- IBatina (1)
Pull Request Authors
- tpfau (8)
- bxbach732 (5)
- badomate (1)
- IBatina (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- unit 1.32.1-python3.11 build
- python 3.9 build
- python 3.9 build
- python 3.9 build
- python 3.9 build
- 480 dependencies
- @rushstack/eslint-patch ^1.3.3 development
- @tsconfig/node20 ^20.1.2 development
- @types/jsdom ^21.1.6 development
- @types/node ^20.11.28 development
- @vitejs/plugin-vue ^5.0.4 development
- @vue/eslint-config-prettier ^8.0.0 development
- @vue/eslint-config-typescript ^12.0.0 development
- @vue/test-utils ^2.4.5 development
- @vue/tsconfig ^0.5.1 development
- eslint ^8.49.0 development
- eslint-plugin-vue ^9.17.0 development
- jsdom ^24.0.0 development
- npm-run-all2 ^6.1.2 development
- prettier ^3.0.3 development
- typescript ~5.4.0 development
- vite ^5.1.6 development
- vite-plugin-vue-devtools ^7.0.18 development
- vitest ^1.4.0 development
- vue-tsc ^2.0.6 development
- @vueuse/core ^10.9.0
- axios ^1.6.8
- html2canvas ^1.4.1
- pinia ^2.1.7
- primeflex ^3.3.1
- primeicons ^6.0.1
- primevue ^3.50.0
- vue ^3.4.21
- vue-router ^4.3.0
- 480 dependencies
- @rushstack/eslint-patch ^1.3.3 development
- @tsconfig/node20 ^20.1.2 development
- @types/jsdom ^21.1.6 development
- @types/node ^20.11.28 development
- @vitejs/plugin-vue ^5.0.4 development
- @vue/eslint-config-prettier ^8.0.0 development
- @vue/eslint-config-typescript ^12.0.0 development
- @vue/test-utils ^2.4.5 development
- @vue/tsconfig ^0.5.1 development
- eslint ^8.49.0 development
- eslint-plugin-vue ^9.17.0 development
- jsdom ^24.0.0 development
- npm-run-all2 ^6.1.2 development
- prettier ^3.0.3 development
- typescript ~5.4.0 development
- vite ^5.1.6 development
- vite-plugin-vue-devtools ^7.0.18 development
- vitest ^1.4.0 development
- vue-tsc ^2.0.6 development
- @vueuse/core ^10.9.0
- axios ^1.6.8
- html2canvas ^1.4.1
- pinia ^2.1.7
- primeflex ^3.3.1
- primeicons ^6.0.1
- primevue ^3.50.0
- vue ^3.4.21
- vue-router ^4.3.0
- grpcio *
- grpcio-tools *
- langchain *
- langchain-openai *
- openai *
- protobuf *
- pydantic *
- grpcio *
- grpcio-tools *
- langchain *
- langchain-openai *
- openai *
- protobuf *
- pydantic *
- google *
- grpcio *
- grpcio-reflection *
- grpcio-tools *
- protobuf *
- uvicorn *
- fastapi *
- grpcio *
- grpcio-tools *
- itsdangerous *
- langchain *
- langchain-openai *
- openai *
- protobuf *
- pydantic *
- uvicorn *