chore(deps): bump Python version to 3.11.9
What does this merge request do and why?
This MR bumps Python version from 3.10.14
to 3.11.9
.
https://docs.python.org/3.11/whatsnew/3.11.html
Python 3.11 is up to 10-60% faster than Python 3.10
How to set up and validate locally
-
Check out to this merge request's branch.
-
Ensure a local Docker image built successfully.
docker build --platform linux/amd64 -t ai-gateway:dev .
-
Run a local service on Docker to confirm the it boots correctly.
docker run -it --platform linux/amd64 --rm -p 5052:5000 \ -e AIGW_AUTH__BYPASS_EXTERNAL=true \ -e AIGW_USE_FAKE_MODELS=false \ -e AIGW_GITLAB_URL="http://gdk.test:8080/" \ -e AIGW_GITLAB_API_URL="http://gdk.test:8080/api/v4/" \ -e AIGW_CUSTOMER_PORTAL_BASE_URL=https://customers.staging.gitlab.com \ -e ANTHROPIC_API_KEY=$ANTHROPIC_TOKEN \ ai-gateway:dev
-
In another terminal window, run a test cURL command and confirm 200 response.
curl --request POST \ --url http://ai-gateway.gdk.test:5052/v1/chat/agent \ --header 'Content-Type: application/json' \ --header 'X-Gitlab-Authentication-Type: oidc' \ --header "authorization: Bearer $ANTHROPIC_TOKEN" \ --data '{ "prompt_components": [ { "type": "prompt", "metadata": { "source": "test-source", "version": "no-version" }, "payload": { "content": [ { "role": "system", "content": "You are a Python engineer" }, { "role": "user", "content": "define a function that adds numbers together" } ], "provider": "anthropic", "model": "claude-3-sonnet-20240229", "params": { "stop_sequences": [ "\n\nHuman", "Observation:" ], "temperature": 0.1 } } } ] }'
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Edited by Tan Le