Skip to content

Commit

Permalink
remove cohere invalid format test, since cohere is so aggressive at m…
Browse files Browse the repository at this point in the history
…atching the output format even when there are no matching instructions
  • Loading branch information
jrhizor committed Oct 18, 2023
1 parent 56e5d24 commit 63effe6
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/elelem.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,32 +302,6 @@ describe("cohere", () => {
expect(result.foundingYear).toBe("1800");
expect(result.populationEstimate).toBeGreaterThan(500000);
}, 10000);

test("invalid format", async () => {
const wrapper = async () => {
return await llm.session(
"invalid-format",
{ cohere: { model: "command" } },
async (c) => {
const { result: cityDescription } = await c.cohere(
"city-description",
{
max_tokens: 100,
temperature: 0,
},
`Request ${Math.random()}\n`,
"Washington, D.C.",
capitolResponseSchema,
LangchainJsonSchemaFormatter,
);
return cityDescription;
},
);
};

// langchain formatter is worse than the one that includes examples, so this should fail with the same prompt
await expect(wrapper()).rejects.toThrowError(ElelemError);
}, 10000);
});

interface AddContext {
Expand Down

0 comments on commit 63effe6

Please sign in to comment.