mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2025-12-20 23:24:20 +01:00
Merge branch 'main' of https://github.com/jina-ai/gptdeploy into refactor-langchain
# Conflicts: # src/apis/gpt.py # src/cli.py # src/options/generate/generator.py # src/options/generate/prompt_system.py # src/options/generate/prompt_tasks.py
This commit is contained in:
@@ -64,13 +64,12 @@ def generate(
|
||||
return
|
||||
|
||||
from src.options.generate.generator import Generator
|
||||
generator = Generator(model=model)
|
||||
generator = Generator(description, test, model=model)
|
||||
with get_openai_callback() as cb:
|
||||
generator.generate(description, test, path)
|
||||
generator.generate(path)
|
||||
print(f"Prompt/Completion/Total Tokens: {cb.prompt_tokens}/{cb.completion_tokens}/{cb.total_tokens}")
|
||||
print(f"Total Cost on OpenAI (USD): ${cb.total_cost}")
|
||||
|
||||
|
||||
@main.command()
|
||||
@path_param
|
||||
def run(path):
|
||||
|
||||
Reference in New Issue
Block a user