Comments (2)
I added a test variable with Chinese characters on line 20 of the example code in ‘ascii_render.py’. The plugin fails to load. Please refer to the attachment and confirm.
from taskweaver.plugin import Plugin, register_plugin
@register_plugin
class AsciiRenderPlugin(Plugin):
def __call__(self, text: str):
try:
import pyfiglet
except ImportError:
raise ImportError("Please install pyfiglet first.")
ASCII_art_1 = pyfiglet.figlet_format(text, font="isometric1")
result = ASCII_art_1
return result
if __name__ == "__main__":
from taskweaver.plugin.context import temp_context
test = "汉字"
with temp_context() as temp_ctx:
render = AsciiRenderPlugin(name="ascii_render", ctx=temp_ctx, config={})
print(render(text="hello world!"))
from taskweaver.
Code modification to match UTF-8 encoding. Please note when using UTF-8 encoding here.
code_executor.py
The load_plugin function, open(src_file, "r") -> open(src_file, "r", encoding="utf-8")
executor.py
The load_impl(self) function, open(module_path, "w") -> open(module_path, "w", encoding="utf-8")
from taskweaver.
Related Issues (20)
- Taskweaver with multiple LLMs seems not working HOT 2
- plugin doesn't work well when I save artifact HOT 1
- Set session variables inside a plugin HOT 2
- Taskweaver code for Sagemaker endpoint
- debug error in latest version HOT 1
- Track or count the number of tokens being used HOT 2
- Handling Korean Font Issues in Matplotlib Visualizations with Taskweaver and Docker HOT 2
- Not able to leverage session event handler in my code HOT 4
- Request for Scatter plot default marker modify HOT 2
- Permission Errors and Plugin Execution Failures in Dockerized Environment
- I can't import packages which needs to be installed HOT 1
- Not able run Taskweaver with LLM Qwen1.5-72B-Chat HOT 2
- Does Taskweaver works with llama3? HOT 2
- Gets stuck in repeating Board messages HOT 1
- Running Ollama with LLama3 and Phi3 HOT 1
- Having trouble getting packages installed for plugins to use HOT 2
- No memory using only code_interperter (without planner) HOT 1
- Couldn't able to change the port number. HOT 1
- After executing the sql_pull_data plugin, the final error displayed is “No such file or directory”. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taskweaver.