This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from memory_agent.kgrag.ollama import KGragOllama | |
| from config import ( | |
| model_ollama, | |
| neo4j_auth, | |
| redis_config, | |
| model_embedding_vs_config, | |
| collection_config, | |
| model_embedding_config, | |
| aws_config, | |
| qdrant_config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from qdrant_client.http.models import Distance | |
| from typing import Any | |
| thread_id = "thread_demo" | |
| user_id = "user_demo" | |
| session_id = "session_demo" | |
| collection_name = "agent_ollama_demo" | |
| neo4j_auth: dict[str, Any] = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fetch = require('node-fetch'); | |
| var requestOptions = { | |
| method: 'GET', | |
| redirect: 'follow' | |
| }; | |
| fetch("http://localhost:3000/api/v1/process/?evalscript=CO", requestOptions) | |
| .then(response => response.text()) | |
| .then(result => console.log(result)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| const FormData = require('form-data'); | |
| const fetch = require('node-fetch'); | |
| var body = new FormData(); | |
| body.append("clientID", "<YOUR CLIENT ID" || process.env.CLIENT_ID); | |
| body.append("clientSecret", "<YOUR CLIENT SECRET>" || process.env.CLIENT_SECRET); | |
| var requestOptions = { | |
| method: 'POST', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var whitelist = require('whitelistcors'); | |
| // lists of origin domains | |
| var origins = ['http://localhost', 'http://mysite.com']; | |
| app.post('/myapi', whitelist(origins), function(req, res, next) { | |
| res.send('CORS OK!'); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| npm install --save whitelistcors | |
| yarn add whitelistcors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker build -t flask-bootstrap . | |
| docker run -p 5000:5000 flask-bootstrap | |
| docker container list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone https://github.com/gzileni/flask-bootstrap.git | |
| cd flask-bootstrap | |
| pip install -r requirements.txt | |
| export FLASK_APP=main.py | |
| flask run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask | |
| from config import DevConfig | |
| app = Flask(__name__) | |
| app.config.from_object(DevConfig) | |
| @app.route('/') | |
| def home(): | |
| return '<h1>Hello World!</h1>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Config(object): | |
| pass | |
| class ProdConfig(Config): | |
| pass | |
| class DevConfig(Config): | |
| DEBUG = True |
NewerOlder