Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions wren-ai-service/eval/preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def get_database_names(path: Path):


def get_tables_by_db(path: Path, key: str):
with open(path, "rb") as f:
with open(path, "rb",encoding="utf-8") as f:
json_data = orjson.loads(f.read())

return {item[key]: item for item in json_data}
Expand Down Expand Up @@ -210,7 +210,7 @@ def build_mdl_relationships(tables_info):


def get_ground_truths_by_db(path: Path, key: str):
with open(path, "rb") as f:
with open(path, "rb",encoding="utf-8") as f:
json_data = orjson.loads(f.read())

results = defaultdict(list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def __init__(
"post_processor": ChartGenerationPostProcessor(),
}

with open("src/pipelines/generation/utils/vega-lite-schema-v5.json", "r") as f:
with open("src/pipelines/generation/utils/vega-lite-schema-v5.json", "r",encoding="utf-8") as f:
_vega_schema = orjson.loads(f.read())

self._configs = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def __init__(
"post_processor": ChartGenerationPostProcessor(),
}

with open("src/pipelines/generation/utils/vega-lite-schema-v5.json", "r") as f:
with open("src/pipelines/generation/utils/vega-lite-schema-v5.json", "r",encoding="utf-8") as f:
_vega_schema = orjson.loads(f.read())

self._configs = {
Expand Down
5 changes: 3 additions & 2 deletions wren-ai-service/src/providers/document_store/qdrant.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import os
from typing import Any, Dict, List, Optional

from qdrant_client.http import models
import numpy as np
import qdrant_client
from haystack import Document, component
Expand Down Expand Up @@ -159,7 +159,8 @@ def __init__(
# to improve the indexing performance
# see https://qdrant.tech/documentation/guides/multiple-partitions/?q=mul#calibrate-performance
self.client.create_payload_index(
collection_name=index, field_name="project_id", field_schema="keyword"
collection_name=index, field_name="project_id",
field_schema=models.PayloadSchemaType.KEYWORD,
)

async def _query_by_embedding(
Expand Down