Skip to content

Commit

Permalink
Merge branch 'feature' into personal/xi/nl2sql_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
aero-xi committed Sep 10, 2024
2 parents 2ea43d7 + 0d5cfc3 commit 8deae9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/pai_rag/app/web/view_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,13 @@ def to_app_config(self):
config["llm"]["multi_modal"]["name"] = self.mllm_api_model_name

config["oss_store"]["enable"] = self.use_oss
if os.getenv("OSS_ACCESS_KEY_ID") is None:
if os.getenv("OSS_ACCESS_KEY_ID") is None and self.oss_ak:
os.environ["OSS_ACCESS_KEY_ID"] = self.oss_ak
if os.getenv("OSS_ACCESS_KEY_SECRET") is None:
if os.getenv("OSS_ACCESS_KEY_SECRET") is None and self.oss_sk:
os.environ["OSS_ACCESS_KEY_SECRET"] = self.oss_sk
if "***" not in self.oss_ak:
if self.oss_ak and "***" not in self.oss_ak:
config["oss_store"]["ak"] = self.oss_ak
if "***" not in self.oss_sk:
if self.oss_sk and "***" not in self.oss_sk:
config["oss_store"]["sk"] = self.oss_sk
config["oss_store"]["endpoint"] = self.oss_endpoint
config["oss_store"]["bucket"] = self.oss_bucket
Expand Down
4 changes: 2 additions & 2 deletions src/pai_rag/config/settings_multi_modal.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ name = "qwen-turbo"
source = ""

[rag.llm.multi_modal]
enable = true
enable = false
source = "DashScope"
name = "qwen-vl-max"

Expand All @@ -89,7 +89,7 @@ chunk_size = 500
chunk_overlap = 10

[rag.oss_store]
enable = true
enable = false
bucket = ""
endpoint = ""
prefix = ""
Expand Down
4 changes: 3 additions & 1 deletion src/pai_rag/core/rag_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def init_trace(trace_config):
service_owner_sub_id="",
)
logger.info(f"Pai-LLM-Trace enabled with endpoint: '{trace_config.endpoint}'.")
else:
elif trace_config is not None and trace_config.type == "arize_phoenix":
set_global_handler("arize_phoenix")
logger.info("Arize trace enabled.")
else:
logger.warning("No trace used.")

0 comments on commit 8deae9b

Please sign in to comment.