Comments (4)
@rpg2807 This is a limitation of running the server as a "frozen" binary. Any packages not included in the binary cannot be imported afterward, so you'll have to bundle it into the binary.
You did the right thing by adding it to requirements.txt, but sometimes pyinstaller misses a few imports when building the binary, which you'll have to list in the hidden_imports
field in continue/run.spec
. So you could try adding 'PyPDF2' to this list and then building again.
from continue.
@rpg2807 We have documentation here on how to add a context provider: https://continue.dev/docs/customization/context-providers#building-your-own-context-provider
Once you have a new context provider (the embeddings provider included), you can add it you your ~/.continue/config.py
like this:
from continuedev.src.continuedev.plugins.context_providers.github import GitHubIssuesContextProvider
...
config=ContinueConfig(
...
context_providers=[
GitHubIssuesContextProvider(
repo_name="continuedev/continue", # change to whichever repo you want to use
auth_token="<my_github_auth_token>",
)
]
)
The embeddings context provider might work, so you could give it a try, but we will be working on it later this week and I can share when we have a production-ready version : )
from continue.
It might make sense (and be easier) to just add .pdf functionality to the URLContextProvider, just as basically an if statement if the URL is a .pdf, and then decode it to text in the specific way needed. Could just implement that in this function without needing to rewrite any of the context provider logic
from continue.
Thanks for the suggestion. That does look like an easier way around.
When I tried, I was having issues correctly installing/importing PyPDF2 module. I tried adding PyPDF2 in the requirements.txt, explicitly called 'pip install PyPDF2' in build.sh but nothing seems to be helping. When I load the extension, this is what I get:
File "/tmp/_MEI9a8UlQ/continuedev/src/continuedev/plugins/context_providers/url.py", line 7, in <module>
from PyPDF4 import PdfFileReader
ModuleNotFoundError: No module named 'PyPDF2'
Could you please instruct how could one add a python module to be used in the context provider?
from continue.
Related Issues (20)
- Dev containers compatibility HOT 1
- Autocomplete using Azure Open AI throws error $.stop' is invalid HOT 2
- Claude 3 Opus uses incorrect endpoint url HOT 2
- claude 3 remains stuck on jetbrains ide HOT 1
- Embeddings Provider has typo in model configuration params HOT 1
- Please Add Support For langfuse and maybe for other similar type of foss solutions which help us in get analytics for our usage of api it will be very helpful for all :-))
- Plugin steals focus in all JetBrains IDEs on Linux HOT 2
- Git Diff Context Provider Hash Awareness
- Extension host terminated unexpectedly 3 times within the last 5 minutes. HOT 10
- Using a tab completions template (moustache) encodes special characters to html HOT 1
- Support for Google models through Vertexai HOT 2
- [CON-218] Continue doesn't handle rate-limiting for embeddings providers HOT 4
- vscode - inline tip always shown HOT 2
- Unresponsive chat when using remote self-hosted Ollama server HOT 2
- VSCode extension: If possible, avoid using "+ L" in keybindings
- Link config.json sections to relevant documentation HOT 1
- Remove paste and cut options from vscode right click HOT 1
- When using /edit in IntelliJ on Mac, original first line is preserved even if it was changed.
- Codebase retrieval mode doesn't properly answer using the context HOT 2
- windows idea no support utf8.Entering and exiting the server with garbled characters HOT 1
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 continue.