How to Use
Before you start, ensure you’ve already obtained theAPI_KEY from the Friendli Suite > Personal Settings > API Keys.
Also, set up your Weaviate instance following this guide.
Your Weaviate instance must be configured with the FriendliAI generative AI integration (generative-friendliai) module.
Instantiation
Now you can instantiate a Weaviate collection using the model. Choose the example for your endpoint type: You can specify one of the available models for the Model APIs. The default model (i.e.zai-org/GLM-5.2) will be used if no model is specified.
Configurable Parameters
Configure the following generative parameters to customize the model behavior.Retrieval Augmented Generation
After configuring Weaviate, perform RAG operations, either with the single prompt or grouped task method.Single Prompt
To generate text for each object in the search results, use the single prompt method. The example below generates outputs for each of the n search results, where n is specified by the limit parameter. When creating a single prompt query, use braces{} to interpolate the object properties you want Weaviate to pass on to the language model.
For example, to pass on the object’s title property, include {title} in the query.