xrkong / autorail Goto Github PK
View Code? Open in Web Editor NEWMake LLM's output more consistent with human values, using autoGen and guardrails
License: MIT License
Make LLM's output more consistent with human values, using autoGen and guardrails
License: MIT License
Hey guys, do you know if there's any way to manage how much context GPT can memorize? For example, if I have an very long prompt, I do not want to feed this prompt every time to the API call which would lead to unnecessary prompt token usage.
Use guardrails to set prompts
--------------------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/kong/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
cli.main()
File "/home/kong/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
run()
File "/home/kong/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
runpy.run_path(target, run_name="__main__")
File "/home/kong/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
return _run_module_code(code, init_globals, run_name,
File "/home/kong/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/home/kong/.vscode/extensions/ms-python.python-2023.22.1/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
exec(code, run_globals)
File "/home/kong/ws/xrkong/autorail/autorail/autorail.py", line 63, in <module>
user_proxy.initiate_chat(manager, message="It's sad and kind of funny how they always play cruel jokes on their fans")
File "/home/kong/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 621, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "/home/kong/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 398, in send
recipient.receive(message, self, request_reply, silent)
File "/home/kong/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 551, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
File "/home/kong/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 1190, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
File "/home/kong/.local/lib/python3.10/site-packages/autogen/agentchat/groupchat.py", line 374, in run_chat
reply = speaker.generate_reply(sender=self)
File "/home/kong/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 1190, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
File "/home/kong/.local/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 708, in generate_oai_reply
response = client.create(
File "/home/kong/.local/lib/python3.10/site-packages/autogen/oai/client.py", line 261, in create
response = self._completions_create(client, params)
File "/home/kong/.local/lib/python3.10/site-packages/autogen/oai/client.py", line 378, in _completions_create
response = completions.create(**params)
File "/home/kong/.local/lib/python3.10/site-packages/openai/_utils/_utils.py", line 271, in wrapper
return func(*args, **kwargs)
File "/home/kong/.local/lib/python3.10/site-packages/openai/resources/chat/completions.py", line 643, in create
return self._post(
File "/home/kong/.local/lib/python3.10/site-packages/openai/_base_client.py", line 1091, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "/home/kong/.local/lib/python3.10/site-packages/openai/_base_client.py", line 852, in request
return self._request(
File "/home/kong/.local/lib/python3.10/site-packages/openai/_base_client.py", line 933, in _request
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': "Additional properties are not allowed ('tool_responses' was unexpected) - 'messages.4'", 'type': 'invalid_request_error', 'param': None, 'code': None}}
Use OpenAi Whisper Speech to Text for enhancement.
To improve the overall quality, clarity, and comprehensiveness of the README file in the [Repository Name] GitHub repository, making it more useful for developers and users.
Introduction Enhancement:
Installation Instructions:
Usage Examples:
Troubleshooting Section:
Contributing Guidelines:
FAQ Section:
License Information:
Contact Information:
Visual Enhancements:
Technical Documentation:
A polished, comprehensive, and user-friendly README file that effectively communicates the purpose, usage, and contribution guidelines of the [Repository Name] project.
You can customize this template according to the specific needs of your project and the current state of your README file.
If the test content triggers LLM in-bulit safety layer, autorail will accidentally stop.
Autorail should catch those exception.
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.