Quantcast
Channel: Weaviate Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 3601

Quickstart tutorial generative search exception on max_token using Python

$
0
0

ps, for now, if you only want to play around you can use the gpt-4 model, like so:

client.collections.delete("Test")
collection = client.collections.create(
    name="Test",
    vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_openai(),
    generative_config=wvc.config.Configure.Generative.openai(model="gpt-4"),
)

collection.data.insert({
        "text": "something about dogs",
    }
)
collection.data.insert({
        "text": "something about cats",
    }
)

results = collection.generate.near_text(
    query="animals",
    grouped_task="Create a content with {text}",
    single_prompt="Translate {text} to portuguese"
)

Viewing all articles
Browse latest Browse all 3601

Trending Articles