Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Inactive
Updated 2 years ago
0
Follow
Will mock functionality be added to the
Will mock functionality be added to the
Inactive
0
Follow
K
Kaveen
2 years ago
Β·
Will mock functionality be added to the GPTKnowledgeGraphIndex in the future? Passing an embed and llm mock into it fails
L
K
9 comments
Share
Open in Discord
L
Logan M
2 years ago
What are you trying to do with mocks exactly?
K
Kaveen
2 years ago
I'm just trying to estimate the token usage before the actual request is executed
K
Kaveen
2 years ago
So I call GPTKnowledgeGraphIndex's constructor once with the mocks and then after I confirm that the price is reasonable I call it with the actual predictor and embedding model
K
Kaveen
2 years ago
It works for the other index types like tree, simple, but fails for knowldege graph
K
Kaveen
2 years ago
https://github.com/jerryjliu/gpt_index/issues/589
L
Logan M
2 years ago
ohhh I see. I can probably take a look at that later today, thanks for making the github issue π
K
Kaveen
2 years ago
No prob, thank you so much!
L
Logan M
2 years ago
@Kaveen it's been merged! Should be included in the next release, or you can install directly from github π
K
Kaveen
2 years ago
@Logan M Thank you so much!
Add a reply
Sign up and join the conversation on Discord
Join on Discord