How should I tell the difference between those two formulas in the circles below. I am studying logistic regression and I have faced two different formulas from two different documents. I don't know if those two formulas are saying the same or slightly talking about different things. My guess is that the formula. 1 is only for one variable, but the formula. 2 is for many variables. Maybe it looks like a simple algebra, but I just want to make sure on this.
Please let me have your expertise about this. I am sorry if I have tagged the wrong places. Thank you.

In the first formula one reads the prob. distribution of a binomial random variable $Y_i$, with $Y_i \sim B(n_i,\pi_i)$.
For the second formula, I believe some interpretation is needed. As in the l.h.s. of second formula some $\beta$'s and an integer $N$ appear, I will consider a regression context with a maximum likelihood estimation.
Then, let $\{x_i, y_i\}_{i=1,\dots,N}$ be collected data with the realizations $y_i\in 1,\dots,n_i$ sampled from binomial random variables $Y_i$ as above, for all $i=1,\dots, N$.
One believes that the $x_i$'s have some explanatory power over the $y_i$'s. For this reason one tries to estimate some parameters $\beta$'s that maximize the conditional likelihood of the $Y_i$'s given the data $x_i$'s. To do so one introduces the (sample) likelihood
$$L(\beta):=\sum_{i=1}^N P(Y_i = y_i | x_i, \beta):= \sum_{i=1}^N f(\bf X_i, \beta), $$ where $\mathbf{X}_i=(x_i,y_i) $ is the $i$-th datum and, by definition,
$$f(\mathbf{X}_i, \beta)=P(Y_i = y_i | x_i, \beta)= \frac{n_i!}{y_i!(n_i-y_i)!}\pi_i(x_i,\beta)^{y_i}(1-\pi_i(x_i,\beta))^{1-y_i}. $$
In other words, the probability of success $\pi_i$ of the $i$-th binomial variable $Y_i$ is now a function of the $i$-th datum $x_i$ and the parameters $\beta$'s. As this parametrization is in general non linear, the maximum likelihood estimation of the $\beta$'s is performed iteratively through numerical algorithms (Newton-Raphson).