Using Smart Connections with Text Generator (another Obsidian Plugin) #551
Unanswered
neojininja
asked this question in
Q&A
Replies: 1 comment
-
For me, the latest version of Smart-Connections requires a slightly different template: Original: ...
const contextResults = await Promise.all(
results.slice(0, 5).map(r =>
app.plugins.plugins["smart-connections"].file_retriever(r.link, { lines: 10, max_chars: 1000 })
)
);
... Working: ...
const contextResults = await Promise.all(
results.slice(0, 5).map(r =>
app.plugins.plugins["smart-connections"]
.brain.smart_blocks.get(r.link, { lines: 10, max_chars: 1000 })
.get_as_context()
)
);
... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I'm very interested in learning how to use Smart Connections with the Text Generator Plugin. Someone has already made an attempt at this but it's not working for me. I've provided error screenshots below and also the reference information I used. Any insight to make this work is greatly appreciated! Thank you in advance.
Here's a quote from someone who got this working on Discord
To contribute with updated code request, we will take the original script provided and modify it according to the suggestion made. The modification involves updating a specific API call within the script to ensure compatibility. Here's how the revised script looks:
And here's the one in Github:
Source: https://github.com/text-gen/tg-smartConnections/blob/main/prompts/summarize.md
promptId: summarize
name: 🗞️Summarize The Results of Smart Connections
description: summarize
author: Noureddine
tags:
version: 0.0.1
disableProvider: true
provider:
{{#script}}
{{/script}}
This input template is currently disabled due to the 'disabledProvider' setting being set to true.
If you wish to utilize this template with a provider, such as Chatbot or another service, please follow these steps:
{{#script}}
{{/script}}
Beta Was this translation helpful? Give feedback.
All reactions