Skip to content
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

Fix_json adds curly braces #362

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -273,7 +273,7 @@ model_path = "hosted_vllm/NousResearch/Meta-Llama-3-8B-Instruct" # Make sure to
PORT = 8787
HOST = "localhost"
URL = f"http://{HOST}:{PORT}/v1"
os.environ["HOSTED_VLLM_API_KEY"] = "token-abc123
os.environ["HOSTED_VLLM_API_KEY"] = "token-abc123"

poem_prompter = curator.LLM(
model_name=model_path,
Original file line number Diff line number Diff line change
@@ -68,6 +68,7 @@ def __init__(self, config: OfflineRequestProcessorConfig):
self.min_tokens: int = config.min_tokens
self.batch_size: int = config.batch_size
self.generation_params = config.generation_params
self.support_structured_output = False

@property
def backend(self):
Original file line number Diff line number Diff line change
@@ -205,7 +205,7 @@ def process_requests(self, requests: list[APIRequest], status_tracker: OfflineSt

for completion, request in zip(completions, requests):
response_message = completion.outputs[0].text
response_message = self.fix_json(response_message)
response_message = self.fix_json(response_message) if self.support_structured_output else response_message

raw_response = {
"request_id": completion.request_id,