Skip to content

Commit

Permalink
Merge pull request #689 from wwulfric/main
Browse files Browse the repository at this point in the history
Prompt Content not print unicode char
  • Loading branch information
zainhoda authored Oct 29, 2024
2 parents 29cc557 + 44bd884 commit e640d58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vanna/ollama/ollama.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def submit_prompt(self, prompt, **kwargs) -> str:
f"model={self.model},\n"
f"options={self.ollama_options},\n"
f"keep_alive={self.keep_alive}")
self.log(f"Prompt Content:\n{json.dumps(prompt)}")
self.log(f"Prompt Content:\n{json.dumps(prompt, ensure_ascii=False)}")
response_dict = self.ollama_client.chat(model=self.model,
messages=prompt,
stream=False,
Expand Down
2 changes: 1 addition & 1 deletion src/vanna/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def assistant_message(self, message: str) -> any:

def submit_prompt(self, prompt, **kwargs) -> str:
# JSON-ify the prompt
json_prompt = json.dumps(prompt)
json_prompt = json.dumps(prompt, ensure_ascii=False)

params = [StringData(data=json_prompt)]

Expand Down

0 comments on commit e640d58

Please sign in to comment.