langchain/tests/unit_tests
Eugene Yurtsev 06e524416c
power bi api wrapper integration tests & bug fix (#4983)
# Powerbi API wrapper bug fix + integration tests

- Bug fix by removing `TYPE_CHECKING` in in utilities/powerbi.py
- Added integration test for power bi api in
utilities/test_powerbi_api.py
- Added integration test for power bi agent in
agent/test_powerbi_agent.py
- Edited .env.examples to help set up power bi related environment
variables
- Updated demo notebook with working code in
docs../examples/powerbi.ipynb - AzureOpenAI -> ChatOpenAI

Notes: 

Chat models (gpt3.5, gpt4) are much more capable than davinci at writing
DAX queries, so that is important to getting the agent to work properly.
Interestingly, gpt3.5-turbo needed the examples=DEFAULT_FEWSHOT_EXAMPLES
to write consistent DAX queries, so gpt4 seems necessary as the smart
llm.

Fixes #4325

## Before submitting

Azure-core and Azure-identity are necessary dependencies

check integration tests with the following:
`pytest tests/integration_tests/utilities/test_powerbi_api.py`
`pytest tests/integration_tests/agent/test_powerbi_agent.py`

You will need a power bi account with a dataset id + table name in order
to test. See .env.examples for details.

## Who can review?
@hwchase17
@vowelparrot

---------

Co-authored-by: aditya-pethe <adityapethe1@gmail.com>
2023-05-19 11:25:52 -04:00
..
agents Add Spark SQL support (#4602) (#4956) 2023-05-18 20:53:08 -07:00
callbacks [Breaking] Refactor Base Tracer(#4549) 2023-05-13 17:23:56 +00:00
chains Callbacks Refactor [base] (#3256) 2023-04-30 11:14:09 -07:00
chat_models Add ChatModel, LLM, and Embeddings for Google's PaLM APIs (#3575) 2023-05-01 15:23:16 -07:00
client Add Support for Flexible Input Format for LLM and Chat Model Runs (#4805) 2023-05-17 14:24:17 +00:00
data Prompt from file proof of concept using plain text (#127) 2022-11-13 13:15:30 -08:00
docstore Add DocstoreFn - lookup doc via arbitrary function (#3760) 2023-04-28 19:50:32 -07:00
document_loaders feat #4479: TextLoader auto detect encoding and improved exceptions (#4927) 2023-05-18 09:55:14 -04:00
evaluation Adding an in-context QA evaluation chain + chain of thought reasoning chain for improved accuracy (#2444) 2023-04-06 22:32:41 -07:00
examples feat #4479: TextLoader auto detect encoding and improved exceptions (#4927) 2023-05-18 09:55:14 -04:00
llms Add Invocation Params (#4509) 2023-05-11 15:34:06 -07:00
memory Zep memory (#4898) 2023-05-17 20:01:01 -07:00
output_parsers Harrison/json new line (#4646) 2023-05-13 21:46:33 -07:00
prompts Add from_file method to message prompt template (#4713) 2023-05-16 16:25:17 -07:00
retrievers Zep Retriever - Vector Search Over Chat History (#4533) 2023-05-18 16:27:18 -07:00
tools power bi api wrapper integration tests & bug fix (#4983) 2023-05-19 11:25:52 -04:00
utilities Add Tenant ID to V2 Tracer (#4135) 2023-05-04 21:35:20 -07:00
vectorstores fix #3884 (#3475) 2023-04-24 19:54:15 -07:00
__init__.py initial commit 2022-10-24 14:51:15 -07:00
conftest.py Add pytest --only-extended and --only-core options (#4494) 2023-05-12 11:35:22 -04:00
test_bash.py Skip flaky unit test (#4591) 2023-05-12 11:54:40 -07:00
test_depedencies.py Catch changes to test group (#4802) 2023-05-16 14:48:56 -04:00
test_document_transformers.py Contextual compression retriever (#2915) 2023-04-20 17:01:14 -07:00
test_formatting.py initial commit 2022-10-24 14:51:15 -07:00
test_math_utils.py Contextual compression retriever (#2915) 2023-04-20 17:01:14 -07:00
test_pytest_config.py Block sockets for unit-tests (#4803) 2023-05-16 14:41:24 -04:00
test_python.py option for csv agent to not include df in prompt (#4610) 2023-05-12 21:55:22 -07:00
test_schema.py [simple][test] Added test case for schema.py (#3692) 2023-04-28 20:42:24 -07:00
test_sql_database_schema.py Suppress duckdb warning in unit tests explicitly (#3653) 2023-04-27 14:29:41 -04:00
test_sql_database.py sql: do not hard code the LIMIT clause in the table_info section (#1563) 2023-03-13 23:08:27 -07:00
test_text_splitter.py Add unit test for _merge_splits function (#3513) 2023-04-25 10:02:59 -07:00