Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
648 B
3
Indexable
Never
API_ENDPOINT="us-central1-aiplatform.googleapis.com"
PROJECT_ID="greenhat23mun-8079"
MODEL_ID="text-bison@001"

curl \
-X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/us-central1/publishers/google/models/${MODEL_ID}:predict" -d \
$'{
    "instances": [
        {
            "content": "Tell me a story about John and Mary living in the same town.
"
        }
    ],
    "parameters": {
        "candidateCount": 1,
        "maxOutputTokens": 256,
        "temperature": 0.2,
        "topP": 0.8,
        "topK": 40
    }
}'