Skip to content

Commit

Permalink
added maas headers
Browse files Browse the repository at this point in the history
  • Loading branch information
sethjuarez committed Aug 14, 2024
1 parent 63e383d commit 21cbedd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtime/prompty/prompty/serverless/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def invoke(self, data: any) -> any:
response = ChatCompletionsClient(
endpoint=self.endpoint,
credential=AzureKeyCredential(self.key),
user_agent=f"prompty/{VERSION}"
).complete(
model=self.model,
messages=data if isinstance(data, list) else [data],
Expand All @@ -61,6 +62,7 @@ def invoke(self, data: any) -> any:
response = EmbeddingsClient(
endpoint=self.endpoint,
credential=AzureKeyCredential(self.key),
user_agent=f"prompty/{VERSION}",
).complete(
model=self.model,
input=data if isinstance(data, list) else [data],
Expand Down

0 comments on commit 21cbedd

Please sign in to comment.