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
{{ message }}
Repository navigation
can't create a Conversation Search(Build-in RAG) model #450
I can't create a model. I am following the documentation:
1 -> first step ok: {"message": "A collection with name conversation_store already exists."}%
2 step: {"message": "Gemini API error: "}%
and this is what I use to get the error(changed the API Key of course with the one I recently created in ai studio:
curl 'http://localhost:8108/conversations/models'
-X POST
-H 'Content-Type: application/json'
-H "X-TYPESENSE-API-KEY: xyz"
-d '{
"id": "conv-model-1",
"model_name": "google/gemini-2.0-flash",
"history_collection": "conversation_store",
"api_key": "AIaksdjfadsjbf",
"system_prompt": "You are an assistant for question-answering. You can only make conversations based on the provided context. If a response cannot be formed strictly using the provided context, politely say you do not have knowledge about that topic.",
"max_bytes": 16384
}'
I also tested my api key before that using: curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=apikey" \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "contents": [{ "parts":[{"text": "Hello!"}] }] }'
Hey @nexus-4,
This isn't related to this repository. I didn't get an error while trying to use this model myself, which version of Typesense are you on? The only issue I've faced is
This model model_name is no longer available to new users. Please update your code to use a newer model for the latest features and improvements
cc: @jasonbosco could you transfer this? I don't have access.
First, I tried direct calling and this was one of the responses:
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:generateContent?key=apikey" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [{
"parts":[{"text": "Olá! Você está funcionando?"}]
}]
}'
{
"candidates": [
{
"content": {
"parts": [
{
"text": "Olá! Sim, estou funcionando perfeitamente. Sou uma inteligência artificial e estou pronto para ajudar.\n\nComo posso ser útil para você hoje? Você tem alguma dúvida, precisa de ajuda com algum texto ou quer conversar sobre algum assunto?",
"thoughtSignature": "EtAHCs0HAb4+9vtNC+fr7XJnlAStgl4yZjnykHtRsE8nddbPRqTHIZlnWqjHCxgbszDhNMx4OAwuqvf7YC9U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Gh7hC2eRzwiYmBUEaCisHZ5S94Yn2VUQQlIZwKkZVrpy4uu2upKfXRs/q1zs049vv+LaK5WcaX6i3U5ygYCZ7KYoVQ/CP6af+QcL4YBzJlgDGlSJvMm9Qu6RyMDDjhY8XdjiMovPYM8YhMUw=="
}
],
"role": "model"
},
"finishReason": "STOP",
"index": 0
}
],
"usageMetadata": {
"promptTokenCount": 6,
"candidatesTokenCount": 48,
"totalTokenCount": 295,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 6
}
],
"thoughtsTokenCount": 241
},
"modelVersion": "gemini-3-flash-preview",
"responseId": "5RC0aZCNJ6Plz7IPwOnE8QE"
}
Then, when I try to use any of the models above to create a model, an error:
curl 'http://localhost:8108/conversations/models' \
-X POST \
-H 'Content-Type: application/json' \
-H "X-TYPESENSE-API-KEY:xyz" \
-d '{
"id": "conv-model-1",
"model_name": "google/gemini-2.5-flash",
"history_collection": "conversation_store",
"api_key": "apikey",
"system_prompt": "You are an assistant for question-answering. You can only make conversations based on the provided context. If a response cannot be formed strictly using the provided context, politely say you do not have knowledge about that topic.",
"max_bytes": 16384
}'
{"message": "Gemini API error: {"message": "Bad request."}"}%
Now, this is a different error, but there's always an error while trying to create a model.
{"message": "Gemini API error: "}%
{"message": "Gemini API timeout."}%
{"message": "Gemini API error: {"message": "Bad request."}"}%
This for sure isn't reproducible on my end. I've tried it with several API keys, several models and all work, even on real queries against the Conversational Search feature.
Tested it both under:
EndeavourOS Linux 6-19.7
MacOS Darwin 25.2.0
On Docker using Typesense 30.1.
❯ curl 'http://localhost:8108/conversations/models' \
-X POST \
-H 'Content-Type: application/json' \
-H "X-TYPESENSE-API-KEY: xyz" \
-d '{ "id": "model1", "model_name": "google/gemini-2.5-flash", "history_collection": "conversation_store", "api_key": "Salazar**********************************", "system_prompt": "You are an assistant for question-answering. You can only make conversations based on the provided context. If a response cannot be formed strictly using the provided context, politely say you do not have knowledge about that topic.", "max_bytes": 16384 }'
{"api_key":"Salazar**********************************","history_collection":"conversation_store","id":"model1","max_bytes":16384,"model_name":"google/gemini-2.5-flash","system_prompt":"You are an assistant for question-answering. You can only make conversations based on the provided context. If a response cannot be formed strictly using the provided context, politely say you do not have knowledge about that topic.","ttl":86400}%
Activity
nexus-4 commentedon Mar 12, 2026
I also tested my api key before that using:
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=apikey" \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "contents": [{ "parts":[{"text": "Hello!"}] }] }'response:
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=apikey" \ -H 'Content-Type: application/json' \ -X POST \ -d '{ "contents": [{ "parts":[{"text": "Hello!"}] }] }' { "candidates": [ { "content": { "parts": [ { "text": "Hi there! How can I help you today?\n" } ], "role": "model" }, "finishReason": "STOP", "avgLogprobs": -0.14047146927226672 } ], "usageMetadata": { "promptTokenCount": 2, "candidatesTokenCount": 11, "totalTokenCount": 13, "promptTokensDetails": [ { "modality": "TEXT", "tokenCount": 2 } ], "candidatesTokensDetails": [ { "modality": "TEXT", "tokenCount": 11 } ] }, "modelVersion": "gemini-2.0-flash", "responseId": "e8OyaZjzG7n-qtsPj8yf2QY" }tharropoulos commentedon Mar 12, 2026
Hey @nexus-4,
This isn't related to this repository. I didn't get an error while trying to use this model myself, which version of Typesense are you on? The only issue I've faced is
cc: @jasonbosco could you transfer this? I don't have access.
nexus-4 commentedon Mar 12, 2026
I just noticed that, sorry.
but, I installed via homebrew...
curl http://localhost:8108/health
{"ok":true}%
curl -H 'X-TYPESENSE-API-KEY: xyz' http://localhost:8108/debug
{"state":1,"version":"30.1"}%
I just tested once more and got the same thing:
{"message": "Gemini API timeout."}%tharropoulos commentedon Mar 12, 2026
This is a different error though, a timeout vs a generic "API error". Could you check it with another model?
nexus-4 commentedon Mar 13, 2026
Some context:
2.0, 2.5-flash and 3-flash-previewFirst, I tried direct calling and this was one of the responses:
Then, when I try to use any of the models above to create a model, an error:
Now, this is a different error, but there's always an error while trying to create a model.
tharropoulos commentedon Mar 13, 2026
This for sure isn't reproducible on my end. I've tried it with several API keys, several models and all work, even on real queries against the Conversational Search feature.
Tested it both under:
On Docker using Typesense 30.1.