#I'm using fetch in Javascript, which is
1 messages · Page 1 of 1 (latest)
I'm using fetch in Javascript, which is pretty much cURL. Not using any packages or SDKs.
So am I. Using curl in php. Could you share how you are constructing your text prompts? Mines sort of looks like this:
` 'solrai_getChatCompletionGoogle' => [
'contents' => [
[
'parts' => [
[
'text' => 'Given the following "User" query and list of "Sources", write a response that answers the query as comprehensively as possible.
User: How can the Solr engine be restarted?
Sources:
[1] Context document 1: Blah, blah...
[2] Context document 2: Blah, blah...
[3] Context document 3: Blah, blah...
]
]
]
],
'generationConfig' => [
'stopSequences' => [],
'temperature' => 0,
'maxOutputTokens' => 6000,
'topP' => 0.6
]
]`
Which works well, until the context documents get more complex. Then the model just stops answering the question, saying that the context documents don't provide the necessary context when in fact they do.