I’m confused between these sentences:
Nous avons de la famille
Nous avons la famille (or une famille)
I’m confused between these sentences:
Nous avons de la famille
Nous avons la famille (or une famille)
Nothing to do with avoir, just the article(s) before the noun.
The combination de + definite article is the article partitif. It's usually translated by a mass noun, meaning something you can't count. For example, you can use it with water, flour, and so on.
This means that de la famille would be used in a sentence like this:
Avez-vous de la famille en Australie ? Do you have family in Australia?
Here "family" treats any family members, whether it's one person or a hundred, as a group. Much like asking "Do you have money in your bank account?"
It's the same if you want to say that someone "is family", i.e. is related by blood.
Fais-les entrer, ils sont de la famille. Let them in, they're family.
On the other hand, the definite article la and the indefinite article une both mean one family (unit), implying that you could look at a bunch of people and count how many families there are.
Combien de familles se sont enregistrées ? How many families are signed up?
Nous avons une famille qui vient. We have one family coming.
Note that in contexts where you'd say "We're a family," such as in a Disney movie, you would use être instead of avoir, as one of these:
Nous sommes une famille. We are a family.
P.S. I've used nous to match your question for the sake of clarity, but you would usually say on instead.
First a little aside (related) that might be helpful
In French you say "Nous sommes une famille" rather rarely and when you do it's not quite idiomatic French and possibly never will be; there just isn't a context of representation as in the case of a company manager, who will be perfectly idiomatic in saying "Nous sommes une compagnie.". Nevertheless, if someone is speaking about their family the legitimacy of a representative rôle is "ensured" provided they use modifiers with the noun "famille". The not quite idiomatic form is used mostly in such situations as for instance when someone on the telephone is inquiring for whom is intended the holiday you're trying to book for the Balearic islands.
There is one possible case and that is when a whole family is gathered in a given place and that for some reason an explanation is asked to a person of the group in order to determine the nature of the grouping; then the person asked can say simply "Nous sommes une famille.". Note that the family does not have to be complete (one of the four children might have remained at home for instance), it's still correct.
The sentences in the question are correct an they have the following interpretation; the first, "Nous avons la famille.", cannot be found as the introduction to a new idea, it must be justified by a context that prepares it; two such contexts are clear and there could be more; it might be well to have a look at those two;
The family is a charge on the person who speaks and their explaining why they shy at the idea of participating in the activety is "Nous avons la famille." and that utterance will often be followed by details in real situations. In that case the people are simply saying that they are responsible for a family and not just for themselves and that they already have their mind rather set on not wanting to take risks.
After the explanations for the first context the idea in what concerns the present one is probably clear.
In those two contexts above and others of that type, however "la" is not standard French; standard usage requires "une".
There are nevertheles plain contexts in which "la" will be fully standard:
ex: Un jeune garçon qui ne connait pas encore son nom s'est perdu dans la rue, et a été amené au poste de police où on s'occupe de retrouver les parents; les responsables de la recherche trouvent finalement qui sont les parents de l'enfant; l'un d'entre eux communique le fait par téléphone à ses supérieurs en disant « Nous avons la famille.». (We found the family.) (equivalents: [Nous avons/On a] trouvé la famille.). Notice, though, that the meaning of the verb is not the factual meaning we had above (possession).
In the case just presented the article is truly determinative, therefore standard and there is no question of thinking about substituting « une » for it; of course that would be wrong.
We come now to "Nous avons une famille.". It can be used in the place of "Nous avons la famille." and should, as can be elicited from the above; there is no difference in meaning. However it can also be used without a preparatory context.
-- Nous avons une famille; alors nous sommes tenus évidemment de faire ce qui est nécessaire au bien-être de ses membres.
-- Nous avons une famille, oui, bien sûr, mais cela ne signifie pas que nous soyons handicapés, tout au contraire, il ne faut pas oublier l'esprit d'entre-aide inhérent à la famille, l'aide qui en découle étant une aide automatiquement et gracieusement dispensée.