Find answers from the community

Updated 2 months ago

can i do a raw call to a llm without

can i do a raw call to a llm without having any document/indexing? i cant figure out where to call .query() on if i just want a direct tool that can call to openai
W
R
2 comments
Yeah you can call llm directly.

Plain Text
from llama_index.llms import OpenAI
# create llm instance 
llm = OpenAI()

# use lllm for raw call
print(llm.complete("hey how are you?"))


https://docs.llamaindex.ai/en/stable/examples/llm/openai.html#call-complete-with-a-prompt
awesome thank you!
Add a reply
Sign up and join the conversation on Discord