Coder Social home page Coder Social logo

Comments (6)

liqul avatar liqul commented on June 26, 2024

The tracing module is not tied to the WebUI, and therefore, you should be able to collect all the traces using TaskWeaver as a lib. When you say that you can see the information in "Telemetry", do you mean the Jaeger frontend? Could you shall more details on how you set up the tracing infrastructure and what are the configurations in the project config file?

from taskweaver.

uebhh avatar uebhh commented on June 26, 2024

The tracing module is not tied to the WebUI, and therefore, you should be able to collect all the traces using TaskWeaver as a lib. When you say that you can see the information in "Telemetry", do you mean the Jaeger frontend? Could you shall more details on how you set up the tracing infrastructure and what are the configurations in the project config file?

The issue has been identified. The virtual environment for executing [Chainlit run app.py] is different from the one for executing [TaskWeaver as a lib]. After installing the OpenTelemetry library in the virtual environment where [TaskWeaver as a lib] is executed, it worked.

Through tracing, I found that the LLM interaction content is the same during the WebUI call and the [taskweaver as lib call]. Is the process: codeInterpreter(result) -> planner -> LLM -> user? It takes a long time to go through LLM again. Is it possible to improve the response speed when using [TaskWeaver as a lib] by following the sequence: codeInterpreter(result) -> planner -> caller?

from taskweaver.

liqul avatar liqul commented on June 26, 2024

The default flow is: caller -> planner -> codeinterpreter -> planner -> caller. By configuring, the flow could be changed to: caller -> codeinterpreter -> caller. If the result is passed to the planner, we need to call LLM to do a planning again to see if any actions need to take before responding to the caller (the same to the user case). For example, if the code interpreter failed, the planner may come up with a new plan to execute. That is why the planner needs to call LLM again when receiving the result from the code interpreter. But if you consider planner is not necessary in your scenario, you can configure the CodeInterpreter as the single role and bypass the planner.

from taskweaver.

uebhh avatar uebhh commented on June 26, 2024

The default flow is: caller -> planner -> codeinterpreter -> planner -> caller. By configuring, the flow could be changed to: caller -> codeinterpreter -> caller. If the result is passed to the planner, we need to call LLM to do a planning again to see if any actions need to take before responding to the caller (the same to the user case). For example, if the code interpreter failed, the planner may come up with a new plan to execute. That is why the planner needs to call LLM again when receiving the result from the code interpreter. But if you consider planner is not necessary in your scenario, you can configure the CodeInterpreter as the single role and bypass the planner.

Thank you for your answer, it's very helpful.
Are you suggesting that in order to avoid unnecessary interactions with the planner, can replace it with a development role to implement the functions within the CodeInterpreter ? However, I noticed that the development role mentioned in the documentation also needs to interact with the planner. How to configure CodeInterpreter as the single role and bypass the planner?

from taskweaver.

liqul avatar liqul commented on June 26, 2024

You can have the following configuration to enable the CodeInterpreter-only mode:

{
    "session.roles": ["code_interpreter"]
}

If it is not configured, the default is:

{
    "session.roles": ["planner", "code_interpreter"]
}

from taskweaver.

uebhh avatar uebhh commented on June 26, 2024

Thank you, I'll give it a try!

from taskweaver.

Related Issues (20)

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.