Free Text Response

Free text response provides natural, conversational-style answers to your queries. It is ideal for general Q&A and scenarios where a narrative or contextualized explanation is needed. This response format supports streaming

ParameterTypeDescription
collection_id(required)StringThe unique ID of the collection to query. obtained from the /collection/create/ endpoint.
request_query(required)StringThe search term or query text.
stream(optional)BooleanEnables streaming response if True, it’s False by default
model(optional)StringSpecific model you desire to query response Check out our list of supported models here

Request Example

from wetro import Wetrocloud

# Initialize the Wetrocloud client
client = Wetrocloud(api_key="your_api_key")

# Query the collection
response = client.collection.query_collection(
    collection_id="my_unique_collection_id",
    request_query="What are the sales trends for Q1?"
)

print(response)

Response Example: Free Text

{
  "response": "The sales for Q1 increased by 20% compared to last year, with online channels contributing significantly.",
  "tokens": 120,
  "success": true
}
FieldDescription
responseConversational response to the query.
tokensNumber of tokens used for processing.
successIndicates whether the query was successful.