Coder Social home page Coder Social logo

PLUGIN ISSUE about taskweaver HOT 8 CLOSED

microsoft avatar microsoft commented on June 16, 2024
PLUGIN ISSUE

from taskweaver.

Comments (8)

zhangxu0307 avatar zhangxu0307 commented on June 16, 2024

Hi, @dhifafaz ! Could you sync to the latest code and have a try again? If you still encounter the same issue, please share the logs to us. Thanks.

from taskweaver.

dhifafaz avatar dhifafaz commented on June 16, 2024

Hi, @dhifafaz ! Could you sync to the latest code and have a try again? If you still encounter the same issue, please share the logs to us. Thanks.

hai thanks for responding, i figured it out the issue, it was by my fault, im insert the wrong path for code_generator.example_base_path

from taskweaver.

dhifafaz avatar dhifafaz commented on June 16, 2024

Hai @zhangxu0307 one quick question, i try to add custom plugins that looks like this
image

but it always failed to executed, the response always look like this

2024-01-08 17:00:24 - CodeInterpreter talk to CodeInterpreter: The following python code has been executed:
python
# Attempting to call the agent_profiling_brand plugin again to analyze the brand 'Telkomsel Indonesia'
# According to the instructions, there is no need to import the plugin, and the result variables should be placed on the last line of the code
brand_profiling_result, brand_profiling_description = agent_profiling_brand('Telkomsel Indonesia')

# Output the profiling result and description
(brand_profiling_result, brand_profiling_description)



The execution of the generated python code above has failed

During execution, the following messages were logged:
Traceback (most recent call last):

  Cell In[5], line 3
    brand_profiling_result, brand_profiling_description = agent_profiling_brand('Telkomsel Indonesia')

NameError: name 'agent_profiling_brand' is not defined

from taskweaver.

zhangxu0307 avatar zhangxu0307 commented on June 16, 2024

Would you mind sharing your spec yaml and implentation python files to us? So that we can debug locally to see how to solve this issue. Thanks.

from taskweaver.

dhifafaz avatar dhifafaz commented on June 16, 2024

i think i found the issue, earlier i try to run it on web ui, and now i try to run it from cli, it shows wrong importing files

image

Because my directory is look like this

image

I'm trying to import a module from custom_module dir. I'm a bit confuse about the importing package for making a plugins. Cause i still figure it out from which dir. the plugin will be executed. Sorry...

from taskweaver.

dhifafaz avatar dhifafaz commented on June 16, 2024

Or i just need to move out the custom_modules dir. outside the project dir. under the TaskWeaver?

from taskweaver.

zhangxu0307 avatar zhangxu0307 commented on June 16, 2024

A workaround method is: adding project dir to the sys path in __main__.py of TaskWeaver:


import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "project")))

from .cli import __main__


def main():
    __main__.main()


if __name__ == "__main__":
    main()

In this way, you can import you module under the poject dir. We will refine the customized module import in the next version.

from taskweaver.

dhifafaz avatar dhifafaz commented on June 16, 2024

okay thanks a lot, it finally working the approach that i take is to move out the custom_modules dir. Thank you so much for your help.

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.