Skip to content

Commit

Permalink
bump version to 151 (langchain-ai#3658)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchase17 authored Apr 27, 2023
1 parent 3b60964 commit 0cf890e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions langchain/utilities/powerbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

import logging
import os
from typing import Any, Dict, Iterable, List, Optional, Union
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Union

import aiohttp
import requests
from aiohttp import ServerTimeoutError
from azure.core.credentials import TokenCredential
from azure.core.exceptions import ClientAuthenticationError
from pydantic import BaseModel, Field, root_validator
from requests.exceptions import Timeout

Expand All @@ -20,6 +18,9 @@

BASE_URL = os.getenv("POWERBI_BASE_URL", "https://api.powerbi.com/v1.0/myorg/datasets/")

if TYPE_CHECKING:
from azure.core.credentials import TokenCredential


class PowerBIDataset(BaseModel):
"""Create PowerBI engine from dataset ID and credential or token.
Expand Down Expand Up @@ -62,6 +63,8 @@ def request_url(self) -> str:
@property
def headers(self) -> Dict[str, str]:
"""Get the token."""
from azure.core.exceptions import ClientAuthenticationError

token = None
if self.token:
token = self.token
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain"
version = "0.0.150"
version = "0.0.151"
description = "Building applications with LLMs through composability"
authors = []
license = "MIT"
Expand All @@ -17,7 +17,7 @@ SQLAlchemy = ">1.3,<3"
requests = "^2"
PyYAML = ">=5.4.1"
numpy = "^1"
azure-core = {version = "^1.26.4"}
azure-core = {version = "^1.26.4", optional=true}
tqdm = {version = ">=4.48.0", optional = true}
openapi-schema-pydantic = "^1.2"
faiss-cpu = {version = "^1", optional = true}
Expand Down Expand Up @@ -149,8 +149,8 @@ qdrant = ["qdrant-client"]
openai = ["openai"]
cohere = ["cohere"]
embeddings = ["sentence-transformers"]
azure = ["azure-identity", "azure-cosmos", "openai"]
all = ["anthropic", "cohere", "openai", "nlpcloud", "huggingface_hub", "jina", "manifest-ml", "elasticsearch", "opensearch-py", "google-search-results", "faiss-cpu", "sentence-transformers", "transformers", "spacy", "nltk", "wikipedia", "beautifulsoup4", "tiktoken", "torch", "jinja2", "pinecone-client", "pinecone-text", "weaviate-client", "redis", "google-api-python-client", "wolframalpha", "qdrant-client", "tensorflow-text", "pypdf", "networkx", "nomic", "aleph-alpha-client", "deeplake", "pgvector", "psycopg2-binary", "boto3", "pyowm", "pytesseract", "html2text", "atlassian-python-api", "gptcache", "duckduckgo-search", "arxiv", "azure-identity", "clickhouse-connect", "azure-cosmos"]
azure = ["azure-identity", "azure-cosmos", "openai", "azure-core"]
all = ["anthropic", "cohere", "openai", "nlpcloud", "huggingface_hub", "jina", "manifest-ml", "elasticsearch", "opensearch-py", "google-search-results", "faiss-cpu", "sentence-transformers", "transformers", "spacy", "nltk", "wikipedia", "beautifulsoup4", "tiktoken", "torch", "jinja2", "pinecone-client", "pinecone-text", "weaviate-client", "redis", "google-api-python-client", "wolframalpha", "qdrant-client", "tensorflow-text", "pypdf", "networkx", "nomic", "aleph-alpha-client", "deeplake", "pgvector", "psycopg2-binary", "boto3", "pyowm", "pytesseract", "html2text", "atlassian-python-api", "gptcache", "duckduckgo-search", "arxiv", "azure-identity", "clickhouse-connect", "azure-cosmos", "lancedb", "lark"]

[tool.ruff]
select = [
Expand Down

0 comments on commit 0cf890e

Please sign in to comment.