Find answers from the community

Updated last year

all the docs in the folder are in

all the docs in the folder are in italian but sometimes i get english responses
L
s
2 comments
Maybe add a static instruction to each query?

response = query_engne.query(input_text = "\nRespond in Italian")

Alternatively, setup a system prompt

Plain Text
from llama_index import LLMPredictor, ServiceContext
from llama_index.llms import OpenAI

llm_predictor = LLMPredictor(system_prompt="Always respond in Italian.")

service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor)

query_engne = load_index_from_storage(storage_context, service_context=service_context).as_query_engine()
i will try system prompt thanks!
Add a reply
Sign up and join the conversation on Discord