-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
i made the llm model to either use local ollama llm models or chatgpt or .... #272
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
base: main
Are you sure you want to change the base?
Conversation
|
if you make this PR backwards compatible with the previous version, it would be useful |
|
you should create another file. you are using the GPT one and erasing the previous code |
FujiwaraChoki
left a comment
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 is not a good PR. Please improve it. Add support, don't remove the existing g4f implementation.
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.
????
| import g4f | ||
| import json | ||
| import openai | ||
| import google.generativeai as genai | ||
|
|
||
| from g4f.client import Client | ||
| import subprocess | ||
| from termcolor import colored | ||
| from dotenv import load_dotenv | ||
| from typing import Tuple, List | ||
| import sys | ||
|
|
||
| # Load environment variables | ||
| load_dotenv("../.env") | ||
|
|
||
| # Set environment variables | ||
| OPENAI_API_KEY = os.getenv('OPENAI_API_KEY') | ||
| openai.api_key = OPENAI_API_KEY | ||
| GOOGLE_API_KEY = os.getenv('GOOGLE_API_KEY') |
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.
You are removing support for g4f. Why?
| return search_terms | ||
|
|
||
|
|
||
| def generate_metadata(video_subject: str, script: str, ai_model: str) -> Tuple[str, str, List[str]]: |
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.
But we need metadata...
i made the llm model to either use local ollama llm models or chatgpt or ....