From f5a300fa2d4b43716ab5baba55ac4112526b578a Mon Sep 17 00:00:00 2001 From: Carson Date: Thu, 19 Dec 2024 14:43:54 -0600 Subject: [PATCH] Fix link in docs; don't include seed in OpenAI request if it isn't needed --- chatlas/_openai.py | 4 +++- docs/get-started.qmd | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chatlas/_openai.py b/chatlas/_openai.py index 370ffb7..7503009 100644 --- a/chatlas/_openai.py +++ b/chatlas/_openai.py @@ -294,10 +294,12 @@ def _chat_perform_args( "stream": stream, "messages": self._as_message_param(turns), "model": self._model, - "seed": self._seed, **(kwargs or {}), } + if self._seed is not None: + kwargs_full["seed"] = self._seed + if tool_schemas: kwargs_full["tools"] = tool_schemas diff --git a/docs/get-started.qmd b/docs/get-started.qmd index 545f8c5..35ac928 100644 --- a/docs/get-started.qmd +++ b/docs/get-started.qmd @@ -82,7 +82,7 @@ Learn more in the article on [structured data extraction](structured-data.qmd). LLMs can also be useful to solve general programming problems. For example: -* You can use LLMs to explain code, or even ask them to [generate a diagram](https://bsky.app/profile/daviddiviny.bsky.social/post/3lb6kjaen4c2u). +* You can use LLMs to explain code, or even ask them to [generate a diagram](https://bsky.app/profile/daviddiviny.com/post/3lb6kjaen4c2u). * You can ask an LLM to analyse your code for potential code smells or security issues. You can do this a function at a time, or explore including the entire source code for your package or script in the prompt.