You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/advanced/springai.md
+91-7Lines changed: 91 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,19 +34,103 @@ chmod 755 ./start.sh
34
34
```bash
35
35
export DB_PASSWORD=""
36
36
```
37
-
38
-
* drop the table `SPRING_AI_VECTORS` if exists, on which it will be automatically converted and ingested the langchain table used to store the embeddings part of the Chatbot configuration:
37
+
* The `<VECTOR_STORE>` created in the Oracle AI Optimizer and Toolkit will be automatically converted in a `<VECTOR_STORE>_SPRINGAI` table, and it will store the same data. If already exists it will be used without modification.
38
+
If you want to start from scratch, drop the table `<VECTOR_STORE>_SPRINGAI`, running in sql:
"messages": [{"role": "user", "content": "Can I use any kind of development environment to run the example?"}],
62
+
"stream": false
63
+
}'
64
+
```
65
+
66
+
the response with RAG:
67
+
68
+
```
69
+
{
70
+
"choices": [
71
+
{
72
+
"message": {
73
+
"content": "Yes, you can use any kind of development environment to run the example, but for ease of development, the guide specifically mentions using an integrated development environment (IDE). It uses IntelliJ IDEA Community version as an example for creating and updating the files for the application (see Document 96EECD7484D3B56C). However, you are not limited to this IDE and can choose any development environment that suits your needs."
74
+
}
75
+
}
76
+
]
77
+
}
78
+
```
79
+
80
+
If you want to ask for a stream output, the request it should be:
"messages": [{"role": "user", "content": "Can I use any kind of development environment to run the example?"}],
88
+
"stream": true
89
+
}'
90
+
```
91
+
92
+
Or a request without RAG:
93
+
```
94
+
curl --get --data-urlencode 'message=Can I use any kind of development environment to run the example?' localhost:9090/v1/service/llm | jq .
95
+
```
96
+
97
+
In this case, the response not grounded it could be:
98
+
99
+
```
100
+
{
101
+
"completion": "Yes, you can use various development environments to run examples, depending on the programming language and the specific example you are working with. Here are some common options:\n\n1. **Integrated Development Environments (IDEs)**:\n - **Visual Studio Code**: A versatile code editor that supports many languages through extensions.\n - **PyCharm**: Great for Python development.\n - **Eclipse**: Commonly used for Java development.\n - **IntelliJ IDEA**: Another popular choice for Java and other languages.\n - **Xcode**: For macOS and iOS development (Swift, Objective-C).\n\n2. **Text Editors**:\n - **Sublime Text**: A lightweight text editor with support for many languages.\n - **Atom**: A hackable text editor for the 21st century.\n - **Notepad++**: A free source code editor for Windows.\n\n3. **Command Line Interfaces**:\n - You can run"
102
+
}
103
+
```
104
+
105
+
### Add new text chunks in the vector store example
106
+
Store additional text chunks in the vector store, along their vector embeddings:
107
+
108
+
```
109
+
curl -X POST http://localhost:9090/v1/service/store-chunks \
110
+
-H "Content-Type: application/json" \
111
+
-d '["First chunk of text.", "Second chunk.", "Another example."]'
112
+
```
113
+
114
+
response will be a list of vector embeddings created:
115
+
116
+
```
117
+
[
118
+
[
119
+
-0.014500250108540058,
120
+
-0.03604526072740555,
121
+
0.035963304340839386,
122
+
0.010181647725403309,
123
+
-0.01610776223242283,
124
+
-0.021091962233185768,
125
+
0.03924199938774109,
126
+
..
127
+
],
128
+
[
129
+
..
130
+
]
131
+
]
132
+
```
46
133
47
-
*`http://localhost:8080/v1/chat/completions`: to use RAG via OpenAI REST API
48
-
*`http://localhost:8080/v1/service/llm`: to chat straight with the LLM used
49
-
*`http://localhost:8080/v1/service/search/`: to search for document similar to the message provided
50
134
51
135
### Run in the Oracle Backend for Microservices and AI
0 commit comments