Json Decode && Mutl-Turns (#4)
This commit is contained in:
@@ -4,7 +4,7 @@ import numpy as np
|
||||
from sglang.backend.base_backend import BaseBackend
|
||||
from sglang.lang.chat_template import get_chat_template
|
||||
from sglang.lang.interpreter import StreamExecutor
|
||||
from sglang.lang.ir import SamplingParams
|
||||
from sglang.lang.ir import SglSamplingParams
|
||||
|
||||
try:
|
||||
import anthropic
|
||||
@@ -28,7 +28,7 @@ class Anthropic(BaseBackend):
|
||||
def generate(
|
||||
self,
|
||||
s: StreamExecutor,
|
||||
sampling_params: SamplingParams,
|
||||
sampling_params: SglSamplingParams,
|
||||
):
|
||||
prompt = s.text_
|
||||
ret = anthropic.Anthropic().completions.create(
|
||||
@@ -43,7 +43,7 @@ class Anthropic(BaseBackend):
|
||||
def generate_stream(
|
||||
self,
|
||||
s: StreamExecutor,
|
||||
sampling_params: SamplingParams,
|
||||
sampling_params: SglSamplingParams,
|
||||
):
|
||||
prompt = s.text_
|
||||
generator = anthropic.Anthropic().completions.create(
|
||||
|
||||
Reference in New Issue
Block a user