This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py | |
| index c1c7af36..6d1aa5d7 100644 | |
| --- a/astroid/nodes/node_classes.py | |
| +++ b/astroid/nodes/node_classes.py | |
| @@ -4692,14 +4692,18 @@ class FormattedValue(NodeNG): | |
| yield util.Uninferable | |
| uninferable_already_generated = True | |
| continue | |
| - formatted = format(value.value, format_spec.value) | |
| - yield Const( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chat_template="{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- '' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from groq import Groq | |
| import json | |
| # Initialize the Groq client | |
| client = Groq() | |
| # Specify the model to be used | |
| MODEL = 'openai/gpt-oss-20b' | |
| def calculate(expression): | |
| """Evaluate a mathematical expression""" |
OlderNewer