Comments (5)
Yes, the new version pickles the LLM models which contain the openai key used when constructing the object.
You can call docs.update_llms('gpt-3.5-turbo')
(or whatever llm you want) to overwrite the existing llms after loading a paperqa object.
from paper-qa.
Aha! Of course! I'm actually using that already, but it didn't occur to me to try it here!
So if I overwrite the existing llm then that will also overwrite the (saved) openai API key?
from paper-qa.
Hmmm... what I actually want to do is to update the API key (from os.environ['OPENAI_API_KEY'] or as an explicit string, doesn't matter) but keep the existing llm (use the same model). Is there an easy way to do that? eg. I might have specified 'gpt-4' when I built the index, but the API key has since hit its quota, so now (at query time) I want to load the index from the pickled file and update the API key but continue to use 'gpt-4' (but ideally without having to separately save the string 'gpt-4'). Is that possible?
from paper-qa.
Yea, just do docs.update_llms('gpt-4')
. Make sure you're on version 2 (since version 3 is incompatible with previously pickled docs)
from paper-qa.
from paper-qa.
Related Issues (20)
- ues installing paper-qa
- Usage with Google Gemini
- Exception: "cannot pickle '_thread.RLock' object" from "import paperqa" (dependency on openai <= 0.28.1?) HOT 4
- Segmentation error and unable to install simsimd HOT 2
- New implementation of locally hosted paper-qa according to the README causes a pydantic error HOT 10
- Advice for streaming contexts faster
- html/xml tags
- No citations
- Docs() generates exception due to langchain AIMessage() not supplying __len__() when I specify a langchain llm HOT 1
- Pydantic throwing an error when following example code HOT 2
- client.model_name doesn't work for langchain ChatAnthropic HOT 1
- minimal example of how to use FAISS: storing, combining, reusing
- 'ChatOllama' object has no attribute 'model_name' HOT 1
- Decompose get_evidence HOT 2
- PaperQA CLI Script draft (ib.bsb.br/clipaper-qa)
- Extract logprobs
- RuntimeError: This event loop is already running HOT 1
- Parsing JSON with newlines
- is working fully now? last time I try was having a lot of problem in the embedding LLMs
- Getting a lot of python packages version mismatch ...
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 paper-qa.