bcg-x-official / agentkit Goto Github PK
View Code? Open in Web Editor NEWStarter-kit to build constrained agents with Nextjs, FastAPI and Langchain
Home Page: https://agentkit.infra.x.bcg.com/
License: MIT License
Starter-kit to build constrained agents with Nextjs, FastAPI and Langchain
Home Page: https://agentkit.infra.x.bcg.com/
License: MIT License
Using the arun
methods to call a chat model -- which is what we currently do -- gives the following warning: LangChainDeprecationWarning: The function arun was deprecated in LangChain 0.1.0 and will be removed in 0.2.0. Use ainvoke instead.
arun
will be removed in langchain==0.2.0
(currently at 0.1.14
) so we should update this sooner rather than later
Can I use this for Non-Code Projects?
Beware of the risks of using running SQL queries directly from client side in public-facing applications, especially with LLMs, due to SQL & prompt injection risks. The SQL Tool in the tool library is not recommended to be used in public-facing applications due to these risks. PR 55 introduces more filters for malignant SQL queries / script injections, but do not guarantee protection against all attacks, as there are inherent risks in executing unparametrized SQL queries.
See LangChain's note on a similar topic (link):
"Building Q&A systems of SQL databases requires executing model-generated SQL queries. There are inherent risks in doing this. Make sure that your database connection permissions are always scoped as narrowly as possible for your chain/agent's needs. This will mitigate though not eliminate the risks of building a model-driven system. For more on general security best practices, see here
Nice project! Just wanted to report this:
https://agentkit.infra.x.bcg.com/docs/advanced/optional_features
Describe the bug
Error message, when starting:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Seems Next/Node memory parameter is too small, in the Docker container.
I tried adding some NODE_OPTIONS to increase memory up to 4096M.
Got a different error, but still does not work.
At exact same place.
I expect it works out of the box.
Steps To Reproduce
When running command, as described in the documentation:
docker-compose -f docker-compose.yml up -d
Desktop (please complete the following information):
[nextjs_server builder 5/5] RUN yarn run build:
0.837 yarn run v1.22.19
0.950 $ next build
3.208 Attention: Next.js now collects completely anonymous telemetry regarding usage.
3.208 This information is used to shape Next.js' roadmap and prioritize features.
3.208 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
3.209 https://nextjs.org/telemetry
3.209
3.463 Skipping validation of types
3.464 Linting ...
20.16
20.16 ./src/components/Common/Drawer/Drawer.tsx
20.16 4:1 Warning:@react-hookz/web
import should occur before import offramer-motion
import/order
20.16
20.16 ./src/components/ConversationView/MessageView/MessageEvents/MessageEvent/LLMResponse.tsx
20.16 4:1 Warning:~/components/ConversationView/ConversationView.selectors
import should occur before import of../../../../CustomIcons/Icon
import/order
20.16 52:17 Warning: Classnames 'mb-1, mt-1' could be replaced by the 'my-1' shorthand! tailwindcss/enforces-shorthand
20.16
20.16 info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
20.21 ▲ Next.js 14.0.4
20.21 - Environments: .env
20.21
20.21 Creating an optimized production build ...
68.59
68.60 ╭── 🌼 daisyUI 3.9.4 https://daisyui.com
69.33 │
69.33 ├── prefix is enabled, daisyUI classnames must use daisy prefix. like: daisybtn
69.33 │ https://daisyui.com/docs/config
69.33 │
69.33 ├── 2 themes are enabled. How to add more themes:
69.33 │ https://daisyui.com/docs/themes
69.33 │
69.33 ╰── ⭐️ Star daisyUI project on GitHub: https://github.com/saadeghi/daisyui
69.33
69.83
69.83 ╭── 🌼 daisyUI 3.9.4 https://daisyui.com
70.07 │
70.07 ├── prefix is enabled, daisyUI classnames must use daisy prefix. like: daisybtn
70.07 │ https://daisyui.com/docs/config
70.07 │
70.07 ├── 2 themes are enabled. How to add more themes:
70.07 │ https://daisyui.com/docs/themes
70.07 │
70.07 ╰── ⭐️ Star daisyUI project on GitHub: https://github.com/saadeghi/daisyui
70.07
70.51
70.51 ╭── 🌼 daisyUI 3.9.4 https://daisyui.com
70.73 │
70.73 ├── prefix is enabled, daisyUI classnames must use daisy prefix. like: daisybtn
70.73 │ https://daisyui.com/docs/config
70.73 │
70.73 ├── 2 themes are enabled. How to add more themes:
70.73 │ https://daisyui.com/docs/themes
70.73 │
70.73 ╰── ⭐️ Star daisyUI project on GitHub: https://github.com/saadeghi/daisyui
70.73
100.1
100.1 <--- Last few GCs --->
100.1
100.1 [27:0x7fc20fca8030] 98218 ms: Mark-sweep (reduce) 728.1 (749.7) -> 726.8 (745.2) MB, 472.2 / 0.0 ms (+ 213.5 ms in 49 steps since start of marking, biggest step 11.4 ms, walltime since start of marking 745 ms) (average mu = 0.414, current mu = 0.278) [27:0x7fc20fca8030] 99017 ms: Mark-sweep (reduce) 727.9 (745.2) -> 727.1 (745.7) MB, 793.5 / 0.0 ms (average mu = 0.245, current mu = 0.008) allocation failure; scavenge might not succeed
100.1
100.1
100.1 <--- JS stacktrace --->
100.1
100.1 FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
100.8 error Command failed with signal "SIGABRT".
100.8 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
failed to solve: process "/bin/sh -c yarn run build" did not complete successfully: exit code: 1
Describe the bug
When trying to launch the tests suite after a fresh install, I get the following error: ValueError: the greenlet library is required to use this function. No module named 'greenlet'
Steps To Reproduce
Steps to reproduce the behavior:
cd backend/app
poetry install --with-dev
poetry shell
pytest -c tests/pytest.ini
Expected behavior
The test suite should run with no error.
Desktop (please complete the following information):
Additional context
poetry add greenlet
fixed the isssuedocker-compose -f docker-compose.yml up -d
[fastapi_server internal] load build context:
failed to solve: changes out of order: "app/poetry.lock" ""`
Chat history is silently truncated when going over max_token_limit
, as we are using the LangChain class ConversationTokenBufferMemory
for the chat_history
object. The default max_token_limit
in agent.yml
is currently set to 4k, which is easily too little with current LLMs. Propose to:
llm
to gpt-4o
Describe the bug
After cloning the repository, updating the .env files, and adding my OpenAI key, the docker container doesn't load.
Steps To Reproduce
Steps to reproduce the behavior:
Follow the instructions in the readme using a new installation.
Expected behavior
Docker container loads without issues.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.