You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print("==== Q & A ====")
print(f"Question: {question}\n")
print("Answering question using RAG collection...")
try:
# Assuming the RAG Collection ID is passed as a separate parameter,
# which is not shown in the documentation snippet provided.
result = gradient.answer(
question=question,
RAG_Collections="Rag collection Id" # Speculative parameter
)
print(f"Answer: {result['answer']}")
except TypeError as e:
print(f"An error occurred: {e}")
print("================\n")
I tryed using Rag Collection in the Python Code but couldn't figure out how to make it inside of the code
import gradientai
import os
from gradientai import Gradient
os.environ['GRADIENT_ACCESS_TOKEN'] = ""
os.environ['GRADIENT_WORKSPACE_ID'] =""
Initialize your Gradient instance
gradient = Gradient()
Initialize your Gradient instance
gradient = Gradient()
def run_answer_example_with_rag_collection(*, gradient: Gradient) -> None:
question = "What is Mprofy?"
Run the function
run_answer_example_with_rag_collection(gradient=gradient)
This is the code i have tryed but i couldn't bring it working
The text was updated successfully, but these errors were encountered: