-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Issue]: <title> not supported for japanese language.. #816
Labels
community_support
Issue handled by community members
Comments
prasantpoudel
added
the
triage
Default label assignment, indicates new issue needs reviewed by a maintainer
label
Aug 5, 2024
natoverse
added
community_support
Issue handled by community members
and removed
triage
Default label assignment, indicates new issue needs reviewed by a maintainer
labels
Aug 5, 2024
This is caused by not doing ensure_ascii=False in json.dumps. class FileWorkflowCallbacks(NoopWorkflowCallbacks):
"""A reporter that writes to a file."""
_out_stream: TextIOWrapper
def __init__(self, directory: str):
"""Create a new file-based workflow reporter."""
Path(directory).mkdir(parents=True, exist_ok=True)
self._out_stream = open( # noqa: PTH123, SIM115
Path(directory) / "logs.json", "a", encoding="utf-8", errors="strict"
)
def on_error(
self,
message: str,
cause: BaseException | None = None,
stack: str | None = None,
details: dict | None = None,
):
"""Handle when an error occurs."""
self._out_stream.write(
json.dumps({
"type": "error",
"data": message,
"stack": stack,
"source": str(cause),
"details": details,
}, ensure_ascii=False)
+ "\n"
)
message = f"{message} details={details}"
log.info(message)
def on_warning(self, message: str, details: dict | None = None):
"""Handle when a warning occurs."""
self._out_stream.write(
json.dumps({"type": "warning", "data": message, "details": details}, ensure_ascii=False) + "\n"
)
_print_warning(message)
def on_log(self, message: str, details: dict | None = None):
"""Handle when a log message is produced."""
self._out_stream.write(
json.dumps({"type": "log", "data": message, "details": details}, ensure_ascii=False) + "\n"
)
message = f"{message} details={details}"
log.info(message)
def _print_warning(skk):
log.warning(skk) |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Describe the issue
I am testing the graphrag for japanese text to create a graph and query the text file using local and global method.
issue1- when the community report are generated , many part of the report the result are "title": "\u5343\u6210\u5de5\u696d\u682a\u5f0f\u4f1a\u793e like unicode format
issue2: when i query using the local method, it don't give the output from the text that i feeded at the time of indexing process. the llm is giving it own knowledge instead of searching from the lancedb or from community report.
model use llama3 using ollama service
The text was updated successfully, but these errors were encountered: