Zack Saadioui
8/27/2024
1
Client ID
1
Secret
1
2
bash
ollama pull <model-name>
1
requests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
html
<script type="text/javascript" src="https://cdn.plaid.com/link/link.js"></script>
<button id="link-button">Link Account</button>
<script>
var linkHandler = Plaid.create({
clientName: 'Your App',
env: 'sandbox',
key: 'YOUR_PUBLIC_KEY',
product: ['auth', 'transactions'],
onSuccess: function(public_token, metadata) {
// Send the public_token to your server
},
onExit: function(err, metadata) {
// Optionally handle the case when your user exited Link
}
});
document.getElementById('link-button').onclick = function() {
linkHandler.open();
};
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
python
@app.route('/get_access_token', methods=['POST'])
def get_access_token():
public_token = request.json.get('public_token')
# Exchange public token for access token
response = requests.post('https://sandbox.plaid.com/item/public_token/exchange',
json={
'client_id': PLAID_CLIENT_ID,
'secret': PLAID_SECRET,
'public_token': public_token,
},
)
access_token = response.json().get('access_token')
return jsonify(access_token=access_token)
1 2 3
# Here you would have your Ollama LLM summarize the user’s transactions and respond appropriately response = ollama_response(user_question) return jsonify(response=response)
Copyright © Arsturn 2024