Skip to content
Snippets Groups Projects
  1. Nov 12, 2024
  2. Nov 08, 2024
    • Stan Hu's avatar
      Fix LLM AI client not returning a HTTP response with 204 responses · 98e578c9
      Stan Hu authored
      Previously `Llm::AiGateway::Client#request` returned `nil` if the AI
      Gateway return a `204 No Content` response. However, this makes it
      impossible to discern whether the request was successful or whether
      the server returned a 5xx error.
      
      This was happening because `run_retry_with_exponential_backoff`
      returned `nil` if the body were blank. To fix this, return the
      HTTParty response even the body is blank, but ensure the callers
      handle this.
      
      Changelog: fixed
      98e578c9
  3. Sep 20, 2024
  4. Jun 06, 2024
  5. May 20, 2024
  6. Apr 22, 2024
  7. Dec 14, 2023
  8. Nov 24, 2023
  9. Nov 02, 2023
    • Nicolas Dular's avatar
      Use token usage from Vertex response · cd5f964d
      Nicolas Dular authored
      Instead of relying on an estimation of 4 characters being 1 token, we
      now use the actual tokens we receive from the Vertex API.
      In addition to that, we now track embeddings as a separate action and do
      not count for it twice for input and output.
      cd5f964d
  10. Sep 11, 2023
  11. Sep 04, 2023
    • Nicolas Dular's avatar
      Track AI feature token usage · e1632fba
      Nicolas Dular authored and Alexandru Croitor's avatar Alexandru Croitor committed
      Adds tracking to AI features with an approximated measurement of our
      token usage for Anthropic and Vertex.
      
      It enables us to group token usage per feature or per user.
      e1632fba
  12. Aug 30, 2023
    • Jan Provaznik's avatar
      Update AI client SLI · 95c65597
      Jan Provaznik authored and Gosia Ksionek's avatar Gosia Ksionek committed
      * with this change success ratio of AI requests is measured outside of
        exponential backoff
      * llm_chat_answers SLI is replaced with more generic llm_completion
        which tracks error ratio of all AI actions
      95c65597
  13. Aug 28, 2023
  14. Aug 10, 2023
  15. Aug 02, 2023
  16. Aug 01, 2023
  17. Jun 21, 2023
  18. Jun 12, 2023
  19. May 18, 2023
  20. May 16, 2023
  21. May 11, 2023
    • Patrick Bajao's avatar
      Define different service names per LLM client · 401d4dae
      Patrick Bajao authored
      `Gitlab::Llm::Concerns::CircuitBreaker` requires `service_name` to
      be defined.
      
      Before this change, we are only using a single `service_name` and
      that means all client will use a single circuit. If a single provider
      fails and the circuit opens, all providers will be affected.
      
      To prevent that, since we have different clients (e.g. OpenAI, Vertex,
      Anthropic), we define a specific service name per client.
      
      This also includes a fix to `ExponentialBackoff` concern to raise
      the correct exception to avoid a `NameError`.
      401d4dae
  22. May 10, 2023
  23. May 05, 2023
  24. May 04, 2023
  25. Apr 26, 2023
Loading