refactor: Refactor for core SDK (#1092)

This commit is contained in:
Fangyin Cheng
2024-01-21 09:57:57 +08:00
committed by GitHub
parent ba7248adbb
commit 2d905191f8
45 changed files with 236 additions and 133 deletions

View File

@@ -17,7 +17,7 @@ from dbgpt.core.operator import (
)
from dbgpt.datasource.operator.datasource_operator import DatasourceOperator
from dbgpt.datasource.rdbms.conn_sqlite import SQLiteTempConnect
from dbgpt.model import OpenAILLMClient
from dbgpt.model.proxy import OpenAILLMClient
from dbgpt.rag.operator.datasource import DatasourceRetrieverOperator
@@ -144,12 +144,10 @@ with DAG("simple_sdk_llm_sql_example") as dag:
if __name__ == "__main__":
input_data = {
"data": {
"db_name": "test_db",
"dialect": "sqlite",
"top_k": 5,
"user_input": "What is the name and age of the user with age less than 18",
}
"db_name": "test_db",
"dialect": "sqlite",
"top_k": 5,
"user_input": "What is the name and age of the user with age less than 18",
}
output = asyncio.run(sql_result_task.call(call_data=input_data))
print(f"\nthoughts: {output.get('thoughts')}\n")