Skip to content

Conversation

@zzstoatzz
Copy link
Collaborator

@zzstoatzz zzstoatzz commented Dec 14, 2023

a couple tweaks from playing with the service-layer branch

this is looking cool!

does marvin._mappings.types nullify what we have in marvin.serializers for the most part?

data: dict[str, Any] = {}
data[field_name] = json.loads(tool_arguments[0])
return response_model.model_validate_json(json.dumps(data))
else:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was unreachable


return create_model(
model_name,
__doc__=model_description,
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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


class AIFunctionKwargsDefaults(BaseModel):
model_config = ConfigDict(arbitrary_types_allowed=True)
model_config = ConfigDict(arbitrary_types_allowed=True, protected_namespaces=())
Copy link
Collaborator Author

@zzstoatzz zzstoatzz Dec 14, 2023

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

@zzstoatzz zzstoatzz requested a review from aaazzam December 14, 2023 06:25
@zzstoatzz zzstoatzz merged commit 66a26b9 into service-layer Dec 14, 2023
@zzstoatzz zzstoatzz deleted the service-layer-tweaks branch December 14, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants