Find answers from the community

A
Ayfri
Offline, last seen 3 months ago
Joined September 25, 2024
Hey, I was trying a project on a different computer, and now I can't use Query Engine with Pydantic Outputs
Here's my code :
Plain Text
class List(BaseModel):
    """
    List of items.
    """
    items: list[str]

vector_store = RedisVectorStore(
    custom_schema={} # some complex schema I skip
    redis_url=f"redis://{REDIS_HOST}:{REDIS_PORT}",
)

llm = OpenAI(model="gpt-3.5-turbo-0125", temperature=0.0, api_key=OPENAI_API_KEY)
embeddings_model = OpenAIEmbedding(api_key=OPENAI_API_KEY)

Settings.embed_model = embeddings_model
Settings.llm = llm

index = VectorStoreIndex.from_vector_store(vector_store=vector_store)
pydantic_query_engine = index.as_query_engine(output_cls=List, response_mode=ResponseMode.TREE_SUMMARIZE)
query: PydanticResponse = pydantic_query_engine.query("List 5 keywords describing the text.")
print(query.response.json())
It works perfectly well with classic queries 🤔
12 comments
A
L
I'm getting ValueError: Expected function call in ai_message.additional_kwargs, but none found. when trying to use Structured Outputs, the same error using OpenAI Pydantic Program
I'm using 0.8.65 with the code of the documentation

Is the code up-to-date on that feature ?
10 comments
A
L
The bot isn't updated with the new documentation, is it known ?
2 comments
L
Hi, I currently can't use at all, I got a bug yesterday on a question, and now I just can't use the bot
2 comments
k
A
Ayfri
·

@Logan M

2 comments
A
L
Why do Llama index python sometimes has changelog in releases, and sometimes you have to check the CHANGELOG.md by hand ?
2 comments
A
W
A
Ayfri
·

Spam

@Logan M again another spam in every channel :c
2 comments
A
L
A
Ayfri
·

Spam

@Logan M please remove that spam, it's present in a lot of channels
2 comments
A
L
Hey I tried to generate descriptions of images using GPT 4 Vision and followed this tutorial : https://docs.llamaindex.ai/en/stable/examples/multi_modal/gpt4v_multi_modal_retrieval.html

But it's not working as I'm getting an error (see in thread)
2 comments
A
https://github.com/run-llama/llama_index/issues/8553 I found out why you can't retrieve more than 10 documents using RedisVectorStore, if this can be fixed quickly this will help my project a lot 🙂
2 comments
A
b
This is a fake article
5 comments
A
L
Haha little mistake I think, we're going from 0.7.19 into 0.0.20 :')
2 comments
L