Comments (2)
I solved it by avoiding the expression language completely by doing it this way instead:
- name: "Write"
type: "query"
input: chunks-topic
configuration:
datasource: "JdbcDatasource"
mode: "execute"
query: |
INSERT INTO documents(filename,chunk_id,num_tokens,lang,text,embeddings_vector) values ( ? , ? , ? , ? , ? , CAST( ? as vector ) );
output-field: "value.command_result"
fields:
- "value.filename"
- "fn:toInt(value.chunk_id)"
- "fn:toInt(value.chunk_num_tokens)"
- "value.language"
- "value.text"
- "fn:toString(fn:toListOfFloat(value.embeddings_vector))"
from langstream.
This a full solution with PG
https://github.com/LangStream/langstream/tree/main/examples/applications/query-postgresql-chat-history
from langstream.
Related Issues (20)
- mini-langstream getting started (deploy sample app) fails with: Missing required option: '--instance=<instanceFilePath>'
- mini-langstream start suggestion fails to deploy due to incorrect path
- [Feature request] Add more automatic configuration for LangChain LLMs for Python processors HOT 2
- [Feature request] Toggle for showing credentials in log
- langstream apps deploy should provide more beginner friendly help if it can't connect to annot connect to http://localhost:8090/api/applications/ HOT 1
- java.lang.RuntimeException: Missing some input keys: {'query'} for source record KafkaRecord.KafkaConsumerRecord HOT 8
- LangStream pipeline UI has disconnect when LangChain is used
- LangStream has no Windows support HOT 1
- ProduceConsumeHandlerTest.testSendEvents is flaky
- write-to-astra sink to support JSON API HOT 2
- Langstream does not work on windows. HOT 1
- redirection to a forbidden domain happened without slash suffix character in the web crawler HOT 1
- Provisioned disks for custom agent permission denied HOT 3
- RESOURCE_EXHAUSTED in python-source agent HOT 8
- Allow runtime upgrade of existing applications HOT 1
- Copy artifacts into the container before compiling
- langstream python run-tests should quote all arguments
- Support GPU in Kubernetes cluster
- SimpleHeader values not decoding properly in log-event agent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langstream.