Skip to content

Commit 90c370e

Browse files
committed
Fix formatting issues
1 parent f3ff405 commit 90c370e

File tree

7 files changed

+126
-112
lines changed

7 files changed

+126
-112
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Welcome to the official repository for LangChain integration with [Oracle Cloud
2424
For OCI services:
2525

2626
```bash
27-
pip install -U langchain-oci
27+
python -m pip install -U langchain-oci
2828
```
2929

3030
For Oracle AI Vector Search services:
3131

3232
```bash
33-
pip install -U langchain-oracledb
33+
python -m pip install -U langchain-oracledb
3434
```
3535

3636
---

libs/oracledb/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

libs/oracledb/LICENSE.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a "Larger Work" to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.

libs/oracledb/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This package contains the LangChain integrations with [Oracle AI Vector Search](
55
## Installation
66

77
```bash
8-
pip install -U langchain-oracledb
8+
python -m pip install -U langchain-oracledb
99
```
1010

1111
## Examples
@@ -54,7 +54,7 @@ embedding_model = HuggingFaceEmbeddings(
5454
)
5555
vector_store = OracleVS(conn, embedding_model, "TB10", DistanceStrategy.EUCLIDEAN_DISTANCE)
5656

57-
# Add texts to the vector database
57+
# add texts to the vector database
5858
texts = ["A tablespace can be online (accessible) or offline (not accessible) whenever the database is open.\nA tablespace is usually online so that its data is available to users. The SYSTEM tablespace and temporary tablespaces cannot be taken offline.", "The database stores LOBs differently from other data types. Creating a LOB column implicitly creates a LOB segment and a LOB index. "]
5959
metadata = [
6060
{"id": "100", "link": "Document Example Test 1"},
@@ -67,7 +67,7 @@ create_index(
6767
conn, vector_store, params={"idx_name": "hnsw_oravs", "idx_type": "HNSW"}
6868
)
6969

70-
# Perform siliarity search
70+
# perform siliarity search
7171
vs.similarity_search("How does a database stores LOBs?", 1)
7272

7373
```
@@ -98,11 +98,11 @@ loader_params = {
9898
"colname": "data",
9999
}
100100

101-
""" load the docs """
101+
# load the docs
102102
loader = OracleDocLoader(conn=conn, params=loader_params)
103103
docs = loader.load()
104104

105-
""" verify """
105+
# verify
106106
print(f"Number of docs loaded: {len(docs)}")
107107
```
108108

@@ -121,12 +121,12 @@ loader_params = {
121121
"colname": "data",
122122
}
123123

124-
""" load the docs """
124+
# load the docs
125125
loader = OracleDocLoader(conn=conn, params=loader_params)
126126
docs = loader.load()
127127

128128
"""
129-
# Some examples
129+
# some examples
130130
# split by chars, max 500 chars
131131
splitter_params = {"split": "chars", "max": 500, "normalize": "all"}
132132
@@ -148,7 +148,7 @@ for doc in docs:
148148
chunks = splitter.split_text(doc.page_content)
149149
list_chunks.extend(chunks)
150150

151-
""" verify """
151+
# verify
152152
print(f"Number of Chunks: {len(list_chunks)}")
153153
# print(f"Chunk-0: {list_chunks[0]}") # content
154154
```
@@ -218,11 +218,11 @@ embedder_params = {
218218
# using ONNX model loaded to Oracle Database
219219
embedder_params = {"provider": "database", "model": "demo_model"}
220220

221-
# If a proxy is not required for your environment, you can omit the 'proxy' parameter below
221+
# if a proxy is not required for your environment, you can omit the 'proxy' parameter below
222222
embedder = OracleEmbeddings(conn=conn, params=embedder_params, proxy=proxy)
223223
embed = embedder.embed_query("Hello World!")
224224

225-
""" verify """
225+
# verify
226226
print(f"Embedding generated by OracleEmbeddings: {embed}")
227227
```
228228

@@ -264,7 +264,7 @@ summary_params = {
264264
}
265265

266266
# get the summary instance
267-
# Remove proxy if not required
267+
# remove proxy if not required
268268
summ = OracleSummary(conn=conn, params=summary_params, proxy=proxy)
269269
summary = summ.get_summary(
270270
"In the heart of the forest, "

libs/oracledb/langchain_oracledb/document_loaders/oracleadb_loader.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,23 @@ def __init__(
5050
:param metadata: metadata used in document
5151
:param parameters: bind variable to use in query
5252
"""
53-
# Mandatory required arguments.
53+
# mandatory required arguments.
5454
self.query = query
5555
self.user = user
5656
self.password = password
5757

58-
# Schema
58+
# schema
5959
self.schema = schema
6060

6161
# TNS connection Method
6262
self.tns_name = tns_name
6363
self.config_dir = config_dir
6464

65-
# Wallet configuration is required for mTLS connection
65+
# wallet configuration is required for mTLS connection
6666
self.wallet_location = wallet_location
6767
self.wallet_password = wallet_password
6868

69-
# Connection String connection method
69+
# connection string connection method
7070
self.connection_string = connection_string
7171

7272
# metadata column

libs/oracledb/langchain_oracledb/embeddings/oracleai.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
class OracleEmbeddings(BaseModel, Embeddings):
3333
"""Get Embeddings"""
3434

35-
"""Oracle Connection"""
35+
# Oracle connection
3636
conn: Any = None
37-
"""Embedding Parameters"""
37+
# embedding parameters
3838
params: Dict[str, Any]
39-
"""Proxy"""
39+
# proxy
4040
proxy: Optional[str] = None
4141

4242
def __init__(self, **kwargs: Any):

0 commit comments

Comments
 (0)