-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT] TaskWeaver Integration #541
Conversation
Codecov ReportAttention: Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Can you share further findings i.e the data set / schema yielded by TaskWeaver's? |
Also todo:
|
Currently I am working on tracking the LLM information for the For this I need to have the |
hey could you share backlinks and reference to the code to make it easy to jump in? I want to have a second hand pair of eyes on this to make this move faster |
TaskWeaver runs as a CLI application in isolation mode by default but you can use it as a library too. TaskWeaver extensively uses the Injector library (API reference here]) in their codebase to inject the dependencies. This is the examples code from the docs that we are also using to test the integration - from taskweaver.app.app import TaskWeaverApp
# This is the folder that contains the taskweaver_config.json file and not the repo root. Defaults to "./project/"
app_dir = "./project/"
app = TaskWeaverApp(app_dir=app_dir)
session = app.get_session()
user_query = "hello, what can you do?"
response_round = session.send_message(user_query)
print(response_round.to_dict()) The The In This method is now used to chat with the LLM and output the responses. This is what we need to monkey patch. We do not have a direct access to the from taskweaver.llm import LLMApi
llmapi = app.app_injector.get(LLMApi) Now we have the from taskweaver.llm.anthropic import AnthropicService
llmapi.completion_service = llmapi.injector.get(AnthropicService)
llmapi.injector.binder.bind(AnthropicService, to=llmapi.completion_service)
app.app_injector.binder.bind(LLMApi, to=llmapi) Also - to override the from taskweaver.llm.anthropic import AnthropicService
llmapi.chat_completion = AnthropicService.chat_completion
app.app_injector.binder.bind(LLMApi, to=llmapi) |
Awesome!!! Almost at the finish line. Can we do 2 things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice-- elegant!
# [Docs] Add observability section for agentops Adds a new section **Observability** under **Advanced Features** for [AgentOps](https://www.agentops.ai/). This is in accordance with this [PR](AgentOps-AI/agentops#541) and should close #445
📥 Pull Request
📘 Description
SessionEventHandler
classUser
,Planner
, andCodeInterpreter
agents present in TaskWeaver🧪 Testing
Tested using the below code by checking the events in the dashboard -
SessionEventHandler
class. This is a TaskWeaver architecture-related problem that we need to resolve.Planner
since it is the intermediary between theUser
and theCodeInterpreter
. This is not a scalable solution and can be the root cause of problems in the future.🗒️ To Do