-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use settings for some defaults, avoid warnings #682
Conversation
@@ -41,9 +40,6 @@ def chat_completion_to_model( | |||
data: dict[str, Any] = {} | |||
data[field_name] = json.loads(tool_arguments[0]) | |||
return response_model.model_validate_json(json.dumps(data)) | |||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was unreachable
@@ -26,6 +26,7 @@ def cast_type_to_model( | |||
|
|||
return create_model( | |||
model_name, | |||
__doc__=model_description, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model_description was unused
client: Optional[Client] = None | ||
aclient: Optional[AsyncClient] = None | ||
temperature: Optional[float] = None | ||
temperature: Optional[float] = marvin.settings.openai.chat.completions.temperature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was getting 400s without these
@@ -44,17 +46,17 @@ class AIFunctionKwargs(TypedDict): | |||
|
|||
|
|||
class AIFunctionKwargsDefaults(BaseModel): | |||
model_config = ConfigDict(arbitrary_types_allowed=True) | |||
model_config = ConfigDict(arbitrary_types_allowed=True, protected_namespaces=()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid warning about infringing on sacred model_*
namespace
a couple tweaks from playing with the
service-layer
branchthis is looking cool!
does
marvin._mappings.types
nullify what we have inmarvin.serializers
for the most part?