Code Monkey home page Code Monkey logo

mentals-ai's People

Contributors

costa-al avatar eltociear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mentals-ai's Issues

Simplified terminal output for demos

I propose simplified output users see in terminal for demo purposes. I believe simplified logs can help focus on what's important in the process we want to show

Here is a simplified version I propose:
image

Local AIn endpoint

This looks like a really amazing idea. I may have missed it, but looks like it only works with OpenAI. Any chance of using a local endpoint in it from Ollama, etc?

make: *** [Makefile:63: build/./src/code_interpreter.cpp.o] Error 1

I am trying to install it in Ubuntu 22.04 and getting following error on make:

(mentalsai) Ubuntu@0068-kci-prxmx10127:/mentals-ai$ make
Using compiler: g++ version
mkdir -p build/./src/
g++ -DLINUX -I./src -I./src/toml++ -I./src/toml++/impl -I./src/treehh -I./src/liboai -I./src/liboai/components -I./src/liboai/include -I./src/liboai/include/components -I./src/liboai/include/core -I./src/liboai/core -I./src/nlohmann -MMD -MP -std=c++20 -Wall -Wextra -Werror -O3 -march=native -c src/code_interpreter.cpp -o build/./src/code_interpreter.cpp.o
src/code_interpreter.cpp: In member function ‘void CodeInterpreter::delete_virtual_environment()’:
src/code_interpreter.cpp:37:11: error: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
37 | system(command.c_str());
| ~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make: *** [Makefile:63: build/./src/code_interpreter.cpp.o] Error 1
(mentalsai) Ubuntu@0068-kci-prxmx10127:
/mentals-ai$

rate limited on first run

Hit with a rate limit on the first run but showing no activity on openapi usage

`./build/mentals agents/loop.gen -d [23:19:21]
Endpoint: https://api.openai.com/v1
API key: sk-proj-0WShc8****************************ha2iCKHPt9u5Q7
Model: gpt-3.5-turbo

Platform info

Operating System: Darwin 23.4.0
Python Version: 3.11.4

pip version: pip 24.0 from /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip (python 3.11)
conda not found.
poetry not found.
pipenv not found.

Init agent...
Init working memory...
Start

[stack_size] 1
[temp] 0.1
[label] root
[desc] Each call send message: "Iteration #current_number". After 3rd iteration message: Hello world!
[use] send_message
[keep_context] true
Exception in LLM::chat_completion: General exception: liboai::Response::CheckResponse(): Rate limited (E_RATELIMIT:0x03)
Exception in Mentals: General exception: liboai::Response::CheckResponse(): Rate limited (E_RATELIMIT:0x03)
libc++abi: terminating due to uncaught exception of type liboai::exception::OpenAIRateLimited: liboai::Response::CheckResponse(): Rate limited (E_RATELIMIT:0x03)
[1] 49315 abort ./build/mentals agents/loop.gen -d
`

Setup CI/CD pipeline for multi-platform binaries with pgvector integration

Description:

We need to establish a CI/CD pipeline that automates the building, testing, and deployment of our application binaries across multiple platforms (Linux, macOS, Windows). This pipeline should also handle the integration and installation of the pgvector database.

Objectives:

  • Multi-Platform Build: Configure the CI/CD pipeline to build the application for Linux, macOS, and Windows platforms.
  • pgvector Integration: Automate the installation and setup of the pgvector database as part of the deployment process.
  • Automated Testing: Implement automated testing to ensure the application and database integration works seamlessly on all platforms.
  • Deployment: Automate the deployment of binaries to a release server or artifact repository.
  • Versioning: Implement version control and release tagging within the pipeline.
  • Documentation: Update documentation with new build and deployment processes.

Technical Requirements:

  • CI/CD Platform: Use GitHub Actions or GitLab CI for pipeline setup.
  • Scripting: Bash or PowerShell scripts for automation tasks, tailored to each target platform.
  • Dependency Management: Ensure all dependencies, including those for pgvector, are correctly managed and installed.
  • Testing Frameworks: Use appropriate testing frameworks compatible with the application's development language.
  • Security: Implement security checks within the pipeline, including code analysis and vulnerability scanning.

Acceptance Criteria:

  • The application builds successfully for Linux, macOS, and Windows.
  • pgvector database is installed and configured automatically during the deployment process.
  • Automated tests pass on all platforms indicating successful integration and functionality.
  • Binaries are automatically deployed to the specified server or repository after successful build and test stages.
  • Documentation accurately reflects the new pipeline and deployment processes.

Implement agent-user chat interface in vue.js

Description:

We need to develop a responsive and intuitive chat interface for our application that allows users to communicate with agents in real-time. This interface should be built using Vue.js and must be compatible with both desktop and mobile devices.

Objectives:

  • Real-Time Messaging: Implement real-time messaging functionality using WebSockets. Ensure messages are received and displayed without requiring the user to refresh the page.
  • Message UI Components: Develop Vue components for displaying messages, including text, timestamps, and status indicators (sent, received, read).
  • Input Field: Create a text input field where users can type their messages. Include features for handling multiline input and basic text formatting (e.g., bold, italics).
  • Agent Identification: Clearly distinguish between messages from the user and messages from agents, possibly through different colors or avatars.
  • Notifications: Implement desktop and in-browser notifications for incoming messages when the chat tab is not active.
  • Accessibility: Ensure the chat UI is accessible, including keyboard navigability and screen reader support.

Technical Requirements:

  • Framework: Vue.js 3.x
  • State Management: Vuex for managing state
  • API Integration: Integrate with backend APIs (WIP) for sending and receiving messages
  • Styling: Use Tailwind CSS for styling to ensure responsiveness and maintainability
  • Testing: Unit and integration tests using Jest and Vue Test Utils

Acceptance Criteria:

  • Users can send and receive messages in real-time.
  • Messages have appropriate timestamps.
  • Interface adapts responsively to different screen sizes.
  • All new components have at least 80% test coverage.
  • Code follows existing project style guidelines and best practices in Vue.js development.

split tools and instructions

It will be cleaner for debuging and management if we split this
{ "content": "Let's execute the task step by step.\n\nAvailable functions:\n<available_functions>\n# plato\nPlato debates with Xenophon.\nOutput only json object:\n{ \"name\" : \"plato\", \"input\" : \"Prompt to send to the tool or assistant. This may be instructions or question.\" }\n\n# socrates\nSocrates proofreads Plato and Xenophon.\nOutput only json object:\n{ \"name\" : \"socrates\", \"input\" : \"Prompt to send to the tool or assistant. This may be instructions or question.\" }\n\n# xenophon\nXenophon seeks Plato's wisdom.\nOutput only json object:\n{ \"name\" : \"xenophon\", \"input\" : \"Prompt to send to the tool or assistant. This may be instructions or question.\" }\n\n# print_to_stdout\nPrint message to console or screen.\nOutput only json object:\n\"{ \"name\" : \"print_to_stdout\", \"message\" : \"text for printing as a plain text\" }\"\n\n# run_python_code\nGenerate python code to execute.\n1. Always add to the code the 'print' function to output result of code execution to the console, e.g. outputting variables important for understanding the result.\n2. Handle potential None or unexpected types in the Python code within the JSON.\n3. If there is JSON in a script, ensure that no characters are before the starting {.\n4. In JSON, all strings must be enclosed in double quotes, and any double quotes within those strings must be escaped using a backslash (\").\n5. Ensure any backslashes in JSON string values are correctly escaped. This includes doubling them up (\\\\) or properly forming escape sequences for special characters.\nOutput only json object:\n\"{ \"name\" : \"run_python_code\", \"python_code\" : \"insert python code here\", \"dependencies\" : \"insert dependencies splitted by space\" }\"\n\n# bash_command_execute\nGenerate bash command to execute.\n1. Do not use for Python code execution and dependency installation.\n2. Do not use for printing.\n3. Do strings with escape charactres and use double quotes.\n4. For http requests, if the string has spaces, insert a '+' between words.\nOutput only json object:\n\"{ \"name\" : \"bash_command_execute\", \"bash_cmd\" : \"insert bash command here as a plain text\" }\"\n\n# store_in_short_term_memory\nWrite a value to a short-term memory.\nFor memorized data, you should always choose a relevant keyword.\nThe memory keyword is taken from the instruction text.\nOutput only json object:\n\"{ \"name\" : \"store_in_short_term_memory\", \"keyword\" : \"insert memory keyword here\", \"value\" : \"insert memory value here as a plain text\" }\"\n\n# stop\nStop and output a result.\nCalled if instructed to stop further execution or task completed.\nOutput only json object:\n\"{ \"name\" : \"stop\", \"output\" : \"insert output here\" }\"\n</available_functions>\n\nIf a function call is required, select the appropriate function from \n<available_functions> to call next and append to the response.\nOnly function names from the <available_functions> can be used.\nAlways add field 'name' with choosed function name to JSON object.\n\nEnsure that each special character that needs to be escaped in JSON, \nlike quotes within your string, is properly escaped.\n\nDon't output the text of the instruction itself.\nCall 'stop' function if the instruction completed.\n\nINSTRUCTION TO EXECUTE\n--------------------\nAsk Plato with user question: about ai\n", "role": "system" },

Into this
{ "content": "Let's execute the task step by step.\n\nAvailable functions:\n<available_functions>\n# plato\nPlato debates with Xenophon.\nOutput only json object:\n{ \"name\" : \"plato\", \"input\" : \"Prompt to send to the tool or assistant. This may be instructions or question.\" }\n\n# socrates\nSocrates proofreads Plato and Xenophon.\nOutput only json object:\n{ \"name\" : \"socrates\", \"input\" : \"Prompt to send to the tool or assistant. This may be instructions or question.\" }\n\n# xenophon\nXenophon seeks Plato's wisdom.\nOutput only json object:\n{ \"name\" : \"xenophon\", \"input\" : \"Prompt to send to the tool or assistant. This may be instructions or question.\" }\n\n# print_to_stdout\nPrint message to console or screen.\nOutput only json object:\n\"{ \"name\" : \"print_to_stdout\", \"message\" : \"text for printing as a plain text\" }\"\n\n# run_python_code\nGenerate python code to execute.\n1. Always add to the code the 'print' function to output result of code execution to the console, e.g. outputting variables important for understanding the result.\n2. Handle potential None or unexpected types in the Python code within the JSON.\n3. If there is JSON in a script, ensure that no characters are before the starting {.\n4. In JSON, all strings must be enclosed in double quotes, and any double quotes within those strings must be escaped using a backslash (\").\n5. Ensure any backslashes in JSON string values are correctly escaped. This includes doubling them up (\\\\) or properly forming escape sequences for special characters.\nOutput only json object:\n\"{ \"name\" : \"run_python_code\", \"python_code\" : \"insert python code here\", \"dependencies\" : \"insert dependencies splitted by space\" }\"\n\n# bash_command_execute\nGenerate bash command to execute.\n1. Do not use for Python code execution and dependency installation.\n2. Do not use for printing.\n3. Do strings with escape charactres and use double quotes.\n4. For http requests, if the string has spaces, insert a '+' between words.\nOutput only json object:\n\"{ \"name\" : \"bash_command_execute\", \"bash_cmd\" : \"insert bash command here as a plain text\" }\"\n\n# store_in_short_term_memory\nWrite a value to a short-term memory.\nFor memorized data, you should always choose a relevant keyword.\nThe memory keyword is taken from the instruction text.\nOutput only json object:\n\"{ \"name\" : \"store_in_short_term_memory\", \"keyword\" : \"insert memory keyword here\", \"value\" : \"insert memory value here as a plain text\" }\"\n\n# stop\nStop and output a result.\nCalled if instructed to stop further execution or task completed.\nOutput only json object:\n\"{ \"name\" : \"stop\", \"output\" : \"insert output here\" }\"\n</available_functions>\n\nIf a function call is required, select the appropriate function from \n<available_functions> to call next and append to the response.\nOnly function names from the <available_functions> can be used.\nAlways add field 'name' with choosed function name to JSON object.\n\nEnsure that each special character that needs to be escaped in JSON, \nlike quotes within your string, is properly escaped.\n\nDon't output the text of the instruction itself.\nCall 'stop' function if the instruction completed.\n\nINSTRUCTION TO EXECUTE", "role": "system" }, { "content": "Ask Plato with user question: about ai\n", "role": "system" }

Develop Rust/C++ API and web server for agent-user chat with pgvector storage

Description:

We are tasked with developing a robust web server and API in C++ to facilitate agent-user chat. This system will leverage pgvector for storing chat messages to take advantage of its vector search capabilities, enhancing the functionality of message retrieval based on content similarity.

Objectives:

  • API Development in C++: Design and implement RESTful API endpoints in C++ to handle message operations such as sending, receiving, and history retrieval.
  • WebSocket Implementation: Integrate WebSocket protocol within the C++ server for real-time messaging capabilities.
  • pgvector Integration: Implement and optimize the storage of chat messages in pgvector, allowing efficient vector operations and message retrieval.
  • Security Measures: Enforce strict authentication and authorization mechanisms to protect the chat data and ensure user privacy.
  • Performance and Scalability: Design the server architecture to handle high throughput and numerous concurrent connections effectively.
  • Comprehensive Testing: Execute detailed testing, including unit, integration, and stress tests, to ensure reliability and robustness.

Technical Requirements:

  • Programming Language: C++ for backend development.
  • Web Framework: Consider using C++ libraries like Beast or Crow for RESTful services and handling HTTP requests.
  • Real-Time Communication: Use WebSocket++ for WebSocket support.
  • Database: Utilize pgvector with PostgreSQL for storing and retrieving vectorized message data.
  • Authentication: Implement security using OpenSSL for HTTPS and possibly integrate OAuth for user authentication.
  • Testing Tools: Use Google Test for unit testing and Google Benchmark for performance testing.
  • Monitoring and Logging: Integrate tools like Prometheus for monitoring and spdlog for logging.

Acceptance Criteria:

  • The server and API can handle basic chat functionalities and manage vector data efficiently using pgvector.
  • Real-time messaging operates with minimal latency and handles message delivery consistently and reliably.
  • The API provides secure access controls, with proper authentication for every endpoint.
  • Performance benchmarks indicate the server can support at least 10,000 concurrent users.
  • Tests cover a wide range of scenarios with at least 80% code coverage.

Fresh venv setup each time for the same agent

I have an agent that executes py code. This requires packages installation. Mentals is capable of installing the packages and running the script. The issue is that each time I run the same agent, a venv setup is starting from scratch.
Sometimes it does well, sometimes it can stuck with errors while trying to install the same packages it did before.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.