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:
Joschka Braun
2023-04-18 12:17:52 +02:00
15 changed files with 112 additions and 85 deletions

View File

@@ -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):